示例#1
0
文件: readg.py 项目: vpaeder/terapy
 def __init__(self, parent = None):
     ReadBase.__init__(self, parent)
     # Generic read
     self.input = 0
     self.index = 0
     self.propNames = ["Input","Quantity"]
     self.is_input = True
     self.is_visible = True
     self.config = ["input","index"]
示例#2
0
文件: readg.py 项目: vpaeder/terapy
 def edit_label(self, event, pos):
     ReadBase.edit_label(self, event, pos)
     if pos==1:
         event.Veto()
         br = self.host.GetBoundingRect(self.get_property_node(1))
         w = ChoicePopup(self.host,-1,choices=self.inlist[self.input].qtynames,pos=br.GetPosition(), size=br.GetSize(), style=wx.CB_DROPDOWN|wx.CB_READONLY)
         w.SetSelection(self.index)
         w.Bind(wx.EVT_CHOICE,self.onSelectIndex)
         w.SetFocus()
         if wx.Platform == '__WXMSW__':
             w.Bind(wx.EVT_KILL_FOCUS,self.onSelectIndex)
示例#3
0
文件: readg.py 项目: vpaeder/terapy
 def refresh(self):
     ReadBase.refresh(self)
     if self.index<0:
         self.index=0
     if self.index>=len(self.inlist[self.input].qtynames):
         self.index = len(self.inlist[self.input].qtynames)-1
示例#4
0
文件: read2.py 项目: vpaeder/terapy
 def __init__(self, parent = None):
     ReadBase.__init__(self, parent)
     self.is_visible = True