예제 #1
0
 def finish_widget_creation(self, sel_marker_parent=None):
     if sel_marker_parent is None: sel_marker_parent = self.parent.widget
     self.sel_marker = misc.SelectionMarker(self.widget, sel_marker_parent)
     WindowBase.finish_widget_creation(self)
     wx.EVT_LEFT_DOWN(self.widget, self.on_set_focus)
     wx.EVT_MOVE(self.widget, self.on_move)
     # re-add the item to update it
     self.sizer.add_item(self, self.pos, self.proportion, self.flag,
                         self.border, self.widget.GetSize())
예제 #2
0
 def finish_widget_creation(self, sel_marker_parent=None, re_add=True):
     if sel_marker_parent is None: sel_marker_parent = self.parent.widget
     self.sel_marker = misc.SelectionMarker(self.widget, sel_marker_parent)
     WindowBase.finish_widget_creation(self)
     self.widget.Bind(wx.EVT_LEFT_DOWN, self.on_set_focus)
     self.widget.Bind(wx.EVT_MOUSE_EVENTS, self.on_mouse_events)
     self.widget.Bind(wx.EVT_MOVE, self.on_move)
     if re_add:
         # re-add the item to update it; this is not to be done when a widget is replaced due to style change
         self.sizer.add_item(self, self.pos)
예제 #3
0
 def finish_widget_creation(self, sel_marker_parent=None):
     if sel_marker_parent is None: sel_marker_parent = self.parent.widget
     self.sel_marker = misc.SelectionMarker(self.widget, sel_marker_parent)
     WindowBase.finish_widget_creation(self)
     wx.EVT_LEFT_DOWN(self.widget, self.on_set_focus)
     wx.EVT_MOVE(self.widget, self.on_move)
     # re-add the item to update it
     self.sizer.add_item(self, self.pos, self.option, self.flag,
                         self.border, self.widget.GetSize())
     # set the value of the properties
     szp = self.sizer_properties
     szp['option'].set_value(self.get_option())
     szp['flag'].set_value(self.get_flag())
     szp['border'].set_value(self.get_border())
     szp['pos'].set_value(self.pos - 1)