Python wx 模块,RA_SPECIFY_COLS 实例源码

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

项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Sum or Subtract Arrays")
        title.SetToolTipNew("Sum or subtract array2 from array 1")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File 1: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename1 = TextPanelObject(self, "Input File 2: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename1, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "output.npy",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.addsub = RadioBoxNew(self, label="Add or Subtract:", choices=['Add','Subtract'],  majorDimension=2, style=wx.RA_SPECIFY_COLS)
        self.addsub.SetToolTipNew("Add or Subtract")
        vbox.Add(self.addsub, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Wrap Numpy Array")
        title.SetToolTipNew("Input array will be converted "+os.linesep+"to wrap around order.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.rbdirection = RadioBoxNew(self, label="Wrap Direction", choices=['Forward','Reverse',],  majorDimension=2, style=wx.RA_SPECIFY_COLS)
        self.rbdirection.SetToolTipNew("If an array dimension has an odd number of elements, "+os.linesep+
                                                            "a Forward followed by a Reverse wrap is required "+os.linesep+
                                                            "to obtain the original array.")
        vbox.Add(self.rbdirection ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self,parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="Numpy array with coordinates to VTK array")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input file: ", "input.npy",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.coords_filename = TextPanelObject(self, "Co-ord's file: ", "coordinates.npy",150,'*.npy')
        vbox.Add(self.coords_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.output_filename = TextPanelObject(self, "Output file: ", "output.vtk",150,"VTK files (*.vtk)|*.vtk|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.rbampphase = wx.RadioBox(self, label="Type", choices=['Amplitude','Phase'],  majorDimension=2, style=wx.RA_SPECIFY_COLS)
        vbox.Add(self.rbampphase,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目: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()
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Fourier Transform Array")
        title.SetToolTipNew("Fourier Transform Input Array.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.rbdirection = wx.RadioBox(self, label="To:", choices=['Fourier Space','Real Space',],  majorDimension=2, style=wx.RA_SPECIFY_COLS)
        vbox.Add(self.rbdirection ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self,parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="Numpy array to VTK array")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input file: ", "input.npy",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.output_filename = TextPanelObject(self, "Output file: ", "output.vtk",150,"VTK files (*.vtk)|*.vtk|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.rbampphase = wx.RadioBox(self, label="Type", choices=['Amplitude','Phase'],  majorDimension=2, style=wx.RA_SPECIFY_COLS)
        vbox.Add(self.rbampphase,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:pyDataView    作者:edwardsmith999    | 项目源码 | 文件源码
def __init__(self,parent,**kwargs):
        wx.Panel.__init__(self,parent,**kwargs)
        choices = ['Profile','Contour']
        self.fieldradiobox = wx.RadioBox(self,label='Plot Type',    
                                    style=wx.RA_SPECIFY_COLS,
                                    choices=choices)
        vbox = wx.BoxSizer(wx.VERTICAL)
        vbox.Add(self.fieldradiobox, 0, wx.EXPAND|wx.ALL, 10)
        self.SetSizer(vbox)
项目:pywatch    作者:jackburridge    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Frame.__init__(self, parent, id=wx.ID_ANY, title=u"Selection Frame", pos=wx.DefaultPosition,
                          size=wx.Size(500, 300), style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)
        self.model = WatchableDict()
        self.model["selection"] = 1
        self.model["list"] = [u"One", u"Two", u"Three"]
        self.SetSizeHintsSz(wx.DefaultSize, wx.DefaultSize)

        sizer = wx.BoxSizer(wx.VERTICAL)

        gb_sizer = wx.GridBagSizer(5, 5)
        gb_sizer.SetFlexibleDirection(wx.BOTH)
        gb_sizer.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        choices = []
        self.combo_box = wx.ComboBox(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize,
                                     choices, 0)
        gb_sizer.Add(self.combo_box, wx.GBPosition(0, 0), wx.GBSpan(1, 1), wx.EXPAND, 5)
        pywatch.wx.ItemContainerItemWatcher(self.combo_box, self.model, "list")
        pywatch.wx.SelectionChanger(self.combo_box, self.model, "selection")

        self.choice = wx.Choice(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, choices, 0)
        self.choice.SetSelection(0)
        gb_sizer.Add(self.choice, wx.GBPosition(1, 0), wx.GBSpan(1, 1), wx.EXPAND, 5)
        pywatch.wx.ItemContainerItemWatcher(self.choice, self.model, "list")
        pywatch.wx.SelectionChanger(self.choice, self.model, "selection")

        self.list_box = wx.ListBox(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, choices, 0)
        gb_sizer.Add(self.list_box, wx.GBPosition(2, 0), wx.GBSpan(1, 1), wx.EXPAND, 5)
        pywatch.wx.ItemContainerItemWatcher(self.list_box, self.model, "list")
        pywatch.wx.SelectionChanger(self.list_box, self.model, "selection")

        self.radio_box = wx.RadioBox(self, wx.ID_ANY, u"Radio Box", wx.DefaultPosition, wx.DefaultSize,
                                     [u"One", u"Two", u"Three"], 1, wx.RA_SPECIFY_COLS)
        self.radio_box.SetSelection(0)
        gb_sizer.Add(self.radio_box, wx.GBPosition(3, 0), wx.GBSpan(1, 1), wx.EXPAND, 5)
        pywatch.wx.SelectionChanger(self.radio_box, self.model, "selection")


        gb_sizer.AddGrowableCol(0)
        gb_sizer.AddGrowableRow(2)

        sizer.Add(gb_sizer, 1, wx.EXPAND | wx.ALL, 5)

        self.SetSizer(sizer)
        self.Layout()

        self.Centre(wx.BOTH)