def __init__(self, *args, **kwds):
# begin wxGlade: ExtractionDialog.__init__
wx.Dialog.__init__(self, *args, **kwds)
self.panel_21 = wx.Panel(self, wx.ID_ANY)
self.panel_22 = wx.Panel(self, wx.ID_ANY)
self.label_2 = wx.StaticText(self, wx.ID_ANY, _("Extraction Location: "))
self.panel_23 = wx.Panel(self, wx.ID_ANY)
self.text_ctrl_outpath = wx.TextCtrl(self, wx.ID_ANY, "")
self.panel_24 = wx.Panel(self, wx.ID_ANY)
self.button_browse_path = wx.Button(self, wx.ID_ANY, _("Browse"))
self.panel_25 = wx.Panel(self, wx.ID_ANY)
self.panel_10 = wx.Panel(self, wx.ID_ANY)
self.panel_13 = wx.Panel(self, wx.ID_ANY)
self.radio_box_selection = wx.RadioBox(self, wx.ID_ANY, _("Selection"), choices=[_("Extract All Highlighted")], majorDimension=1, style=wx.RA_SPECIFY_COLS)
self.panel_14 = wx.Panel(self, wx.ID_ANY)
self.panel_18 = wx.Panel(self, wx.ID_ANY)
self.panel_19 = wx.Panel(self, wx.ID_ANY)
self.checklistbox_options = wx.CheckListBox(self, wx.ID_ANY)
self.panel_20 = wx.Panel(self, wx.ID_ANY)
self.panel_12 = wx.Panel(self, wx.ID_ANY)
self.panel_15 = wx.Panel(self, wx.ID_ANY)
self.button_extract = wx.Button(self, wx.ID_ANY, _("Extract"))
self.panel_16 = wx.Panel(self, wx.ID_ANY)
self.button_cancel = wx.Button(self, wx.ID_ANY, _("Cancel"))
self.panel_17 = wx.Panel(self, wx.ID_ANY)
self.panel_11 = wx.Panel(self, wx.ID_ANY)
self.__set_properties()
self.__do_layout()
self.Bind(wx.EVT_BUTTON, self.button_browse_path_click, self.button_browse_path)
self.Bind(wx.EVT_RADIOBOX, self.radio_box_selection_clicked, self.radio_box_selection)
self.Bind(wx.EVT_BUTTON, self.button_extract_click, self.button_extract)
self.Bind(wx.EVT_BUTTON, self.button_cancel_click, self.button_cancel)
# end wxGlade
self._InitCheckboxes()
python类EVT_RADIOBOX的实例源码
def __init__(self, board):
"""Init the brand new instance"""
super(TeardropDialog, self).__init__(None)
self.board = board
self.SetTitle("Teardrops (v{0})".format(__version__))
self.rbx_action.Bind(wx.EVT_RADIOBOX, self.onAction)
self.Bind(wx.EVT_CLOSE, self.onCloseWindow)
self.but_cancel.Bind(wx.EVT_BUTTON, self.onCloseWindow)
self.but_ok.Bind(wx.EVT_BUTTON, self.onProcessAction)
def set_bindings(self):
self.Bind(wx.EVT_RADIOBOX, self.handle_plottype,
self.choosep.plottype_p.fieldradiobox)
self.Bind(wx.EVT_RADIOBOX, self.handle_fieldtype,
self.choosep.fieldtype_p.fieldradiobox)
self.Bind(wx.EVT_COMBOBOX, self.handle_component,
self.choosep.component_p.componentcombobox)
self.Bind(wx.EVT_COMBOBOX, self.handle_normal,
self.choosep.component_p.normalcombobox)
self.Bind(wx.EVT_COMMAND_SCROLL_THUMBTRACK, self.handle_recslider,
self.slidersp.recslider.slider)
self.Bind(wx.EVT_COMMAND_SCROLL_THUMBTRACK, self.handle_binslider,
self.slidersp.binslider.slider)
self.Bind(wx.EVT_COMMAND_SCROLL_CHANGED, self.handle_recslider,
self.slidersp.recslider.slider)
self.Bind(wx.EVT_COMMAND_SCROLL_CHANGED, self.handle_binslider,
self.slidersp.binslider.slider)
self.Bind(wx.EVT_TEXT_ENTER, self.handle_rectxt,
self.slidersp.recslider.slidertext)
self.Bind(wx.EVT_TEXT_ENTER, self.handle_bintxt,
self.slidersp.binslider.slidertext)
self.Bind(wx.EVT_SPINCTRL, self.handle_recspin,
self.slidersp.recslider.spin)
self.Bind(wx.EVT_SPINCTRL, self.handle_binspin,
self.slidersp.binslider.spin)
self.Bind(wx.EVT_CHECKBOX, self.handle_autoscale,
self.choosep.autoscale_b)
self.Bind(wx.EVT_TEXT_ENTER, self.handle_minscale,
self.choosep.minpspin)
self.Bind(wx.EVT_TEXT_ENTER, self.handle_maxscale,
self.choosep.maxpspin)
self.choosep.save_b.Bind(wx.EVT_BUTTON,
lambda event: self.save_dialogue(event, 'fig.png'))
self.choosep.save_d.Bind(wx.EVT_BUTTON,
lambda event: self.save_dialogue(event, 'data.csv'))
self.choosep.save_s.Bind(wx.EVT_BUTTON,
lambda event: self.save_dialogue(event, 'script.py'))