Python wx 模块,EVT_RADIOBOX 实例源码

我们从Python开源项目中,提取了以下3个代码示例,用于说明如何使用wx.EVT_RADIOBOX

项目:PancakeViewer    作者:forensicmatt    | 项目源码 | 文件源码
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()
项目:kicad_scripts    作者:NilujePerchut    | 项目源码 | 文件源码
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)
项目:pyDataView    作者:edwardsmith999    | 项目源码 | 文件源码
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'))