コード例 #1
0
 def __init__(self, field, parenteditor, idx, parent, *args, **kwargs):
     self.idx = idx
     mwx.TextCtrl.__init__ (self, parent, name=field.path + "_" + str(idx) )
     BaseArrayItemEditor.__init__ (self, field, parenteditor, idx, *args, **kwargs)  
     self._on_text_changed = conditionalmethod (self._on_text_changed)
     self.Bind ( wx.EVT_TEXT, self._on_text_changed )
     self.datatype = NoneType
コード例 #2
0
 def __init__(self, field, parent, *args, **kwargs):
     config = kwargs.get ( "config", {})            
     mwx.TextCtrl.__init__ (self, parent, name=field.path, **config)
     BaseFieldEditor.__init__(self, field, **kwargs)
     self._on_text_changed = conditionalmethod (self._on_text_changed)
     self.Bind ( wx.EVT_TEXT, self._on_text_changed )
     self.datatype = NoneType
コード例 #3
0
 def __init__(self, field, parent, *args, **kwargs):
     config = kwargs.get("config", {})
     mwx.TextCtrl.__init__(self, parent, name=field.path, **config)
     BaseFieldEditor.__init__(self, field, **kwargs)
     self._on_text_changed = conditionalmethod(self._on_text_changed)
     self.Bind(wx.EVT_TEXT, self._on_text_changed)
     self.datatype = NoneType
コード例 #4
0
 def __init__(self, field, parent, *args, **kwargs):
     mwx.CheckBox.__init__ (self, parent, 
                            style = wx.CHK_3STATE,
                            name=field.path)
     BaseFieldEditor.__init__(self, field, **kwargs)
     self._on_checked = conditionalmethod ( self._on_checked )
     self.Bind ( wx.EVT_CHECKBOX, self._on_checked )
     self.datatype = NoneType
コード例 #5
0
 def __init__(self, field, parent, *args, **kwargs):
     mwx.CheckBox.__init__(self,
                           parent,
                           style=wx.CHK_3STATE,
                           name=field.path)
     BaseFieldEditor.__init__(self, field, **kwargs)
     self._on_checked = conditionalmethod(self._on_checked)
     self.Bind(wx.EVT_CHECKBOX, self._on_checked)
     self.datatype = NoneType
コード例 #6
0
 def __init__(self, field, parenteditor, idx, parent, *args, **kwargs):
     self.idx = idx
     mwx.TextCtrl.__init__(self,
                           parent,
                           name=field.path + "_" + str(idx))
     BaseArrayItemEditor.__init__(self, field, parenteditor, idx, *args,
                                  **kwargs)
     self._on_text_changed = conditionalmethod(self._on_text_changed)
     self.Bind(wx.EVT_TEXT, self._on_text_changed)
     self.datatype = NoneType
コード例 #7
0
 def __init__(self, field, parent, *args, **kwargs):
     mwx.ComboBox.__init__(self, parent,
                           style=wx.CB_READONLY,
                           name=field.path)
     BaseFieldEditor.__init__(self, field, **kwargs)
     self.val_idx_hash = {}
     self.val_idx_hash[None] = self.Append ( '<null>', None )
     for val, disp in field.choices:
         self.val_idx_hash[val] = self.Append ( disp, val )
     self._on_combo_box = conditionalmethod ( self._on_combo_box )
     self.Bind (wx.EVT_COMBOBOX, self._on_combo_box )
コード例 #8
0
 def __init__(self, field, parent, *args, **kwargs):
     mwx.ComboReference.__init__ (self, parent, 
                           style=wx.CB_READONLY,
                           name=field.path)            
     BaseReferenceEditor.__init__(self, field, **kwargs)
     self.obj_idx_hash = {}            
     self.obj_idx_hash[None] = self.Append ( "<null>", None )
     for r in self.records:                
         self.obj_idx_hash[r.objectid] = self.Append ( self.reprfunc (r), r )
     self._on_combo_box = conditionalmethod (self._on_combo_box)
     self.Bind ( wx.EVT_COMBOBOX, self._on_combo_box )
コード例 #9
0
 def __init__(self, field, parent, *args, **kwargs):
     mwx.ComboBox.__init__(self,
                           parent,
                           style=wx.CB_READONLY,
                           name=field.path)
     BaseFieldEditor.__init__(self, field, **kwargs)
     self.val_idx_hash = {}
     self.val_idx_hash[None] = self.Append('<null>', None)
     for val, disp in field.choices:
         self.val_idx_hash[val] = self.Append(disp, val)
     self._on_combo_box = conditionalmethod(self._on_combo_box)
     self.Bind(wx.EVT_COMBOBOX, self._on_combo_box)
コード例 #10
0
 def __init__(self, field, parent, *args, **kwargs):
     mwx.ComboReference.__init__(self,
                                 parent,
                                 style=wx.CB_READONLY,
                                 name=field.path)
     BaseReferenceEditor.__init__(self, field, **kwargs)
     self.obj_idx_hash = {}
     self.obj_idx_hash[None] = self.Append("<null>", None)
     for r in self.records:
         self.obj_idx_hash[r.objectid] = self.Append(
             self.reprfunc(r), r)
     self._on_combo_box = conditionalmethod(self._on_combo_box)
     self.Bind(wx.EVT_COMBOBOX, self._on_combo_box)
コード例 #11
0
 def __init__(self, field, parenteditor, idx, parent, *args, **kwargs):
     self.idx = idx
     mwx.ComboBox.__init__ (self, parent, name=field.path + "_" + str(idx) )
     BaseArrayItemEditor.__init__ (self, field, parenteditor, idx, *args, **kwargs)  
                 
     if self.parenteditor.recordlist is not None: self.mode = 'record'
     else: self.mode = 'choice'            
     self.obj_idx_hash = {}
     self.obj_idx_hash[None] = self.Append ( "<null>", None )
     self.obj_idx_hash[()] = self.Append ( "<missing>",  () )
     if self.mode == 'record':
         for r in self.parenteditor.recordlist:                                
             self.obj_idx_hash[r.objectid] = self.Append ( self.parenteditor.reprfunc (r), r )
     else:
         for (val, disp) in self.parenteditor.choices:                
             self.obj_idx_hash[val] = self.Append ( disp, val )
     
     self._on_combo_box = conditionalmethod (self._on_combo_box)
     self.Bind ( wx.EVT_COMBOBOX, self._on_combo_box )
コード例 #12
0
        def __init__(self, field, parenteditor, idx, parent, *args, **kwargs):
            self.idx = idx
            mwx.ComboBox.__init__(self,
                                  parent,
                                  name=field.path + "_" + str(idx))
            BaseArrayItemEditor.__init__(self, field, parenteditor, idx, *args,
                                         **kwargs)

            if self.parenteditor.recordlist is not None: self.mode = 'record'
            else: self.mode = 'choice'
            self.obj_idx_hash = {}
            self.obj_idx_hash[None] = self.Append("<null>", None)
            self.obj_idx_hash[()] = self.Append("<missing>", ())
            if self.mode == 'record':
                for r in self.parenteditor.recordlist:
                    self.obj_idx_hash[r.objectid] = self.Append(
                        self.parenteditor.reprfunc(r), r)
            else:
                for (val, disp) in self.parenteditor.choices:
                    self.obj_idx_hash[val] = self.Append(disp, val)

            self._on_combo_box = conditionalmethod(self._on_combo_box)
            self.Bind(wx.EVT_COMBOBOX, self._on_combo_box)