• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(12005)  |  Call(11979)  |  Derive(26)  |  Import(0)
The basic idea behind a box sizer is that windows will most often be
laid out in rather simple basic geometry, typically in a row or a
column or nested hierarchies of either.  A wx.BoxSizer will lay out
its items in a simple row or column, depending on the orientation
parameter passed to the constructor.

src/o/r/Orbitit-HEAD/Orbitit.py   Orbitit(Download)
        this.canvas = TstScene(shape, this)
        this.canvas.panel = this
        this.canvas.SetMinSize((300, 300))
        this.canvasSizer = wx.BoxSizer(wx.HORIZONTAL)
        this.canvasSizer.Add(this.canvas)
 
        # Ctrl Panel:
        #this.ctrlSizer = ViewSettingsSizer(parent, this, this.canvas)
        mainSizer = wx.BoxSizer(wx.VERTICAL)
class ViewSettingsSizer(wx.BoxSizer):
    def __init__(this, parentWindow, parentPanel, canvas, *args, **kwargs):
        """
        Create a sizer with view settings.
 
        parentWindow: the parentWindow object. This is used to update de
                      status string in the status bar. The parent window is
        this.Guis.append(this.fOptionsGui)
        this.parentPanel.Bind(wx.EVT_RADIOBOX, this.onFOption, id = this.fOptionsGui.GetId())
        this.fOptionsGui.SetSelection(default)
        faceSizer = wx.BoxSizer(wx.HORIZONTAL)
        faceSizer.Add(this.fOptionsGui, 1, wx.EXPAND)
 
        # Sizers
        vRadiusSizer.Add(this.vRadiusGui, 1, wx.EXPAND | wx.TOP    | wx.LEFT)
        vRadiusSizer.Add(this.vColorGui,  1,             wx.BOTTOM | wx.LEFT)
        eRadiusSizer.Add(this.eRadiusGui, 1, wx.EXPAND | wx.TOP    | wx.LEFT)
        eRadiusSizer.Add(this.eColorGui,  1,             wx.BOTTOM | wx.LEFT)
        #sizer = wx.BoxSizer(wx.VERTICAL)
        vSizer = wx.BoxSizer(wx.HORIZONTAL)
        vSizer = wx.BoxSizer(wx.HORIZONTAL)
        vSizer.Add(this.vOptionsGui, 2, wx.EXPAND)
        vSizer.Add(vRadiusSizer, 5, wx.EXPAND)
        eSizer = wx.BoxSizer(wx.HORIZONTAL)
        eSizer.Add(this.eOptionsGui, 2, wx.EXPAND)
        eSizer.Add(eRadiusSizer, 5, wx.EXPAND)
        this.Add(vSizer, 5, wx.EXPAND)
 
        # Now continue with the normal construction of the dialog
        # contents
        sizer = wx.BoxSizer(wx.VERTICAL)
 
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        label = wx.StaticText(this, -1, "Scaling Factor:")
            )
        hbox.Add(this.scalingFactorGui, 1, wx.ALIGN_CENTRE|wx.ALL, 5)
        sizer.Add(hbox, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        label = wx.StaticText(this, -1, "vertex precision (decimals):")
        hbox.Add(label, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
        this.precisionGui = wx.lib.intctrl.IntCtrl(this,
                value = 10,
                min   = 1,
                max   = 16
            )
        hbox.Add(this.precisionGui, 1, wx.ALIGN_CENTRE|wx.ALL, 5)
        sizer.Add(hbox, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
        hbox = wx.BoxSizer(wx.HORIZONTAL)

src/g/e/gertrude-HEAD/trunk/Controls.py   gertrude(Download)
class PeriodeChoice(wx.BoxSizer):
    def __init__(self, parent, instance, member, constructor):
        wx.BoxSizer.__init__(self, wx.VERTICAL)
        self.parent = parent
        self.parent.periode = 0
        self.constructor = constructor
 
        sizer1 = wx.BoxSizer(wx.HORIZONTAL)
        parent.Bind(wx.EVT_BUTTON, self.EvtPeriodeAddButton, self.periodeaddbutton)
        parent.Bind(wx.EVT_BUTTON, self.EvtPeriodeDelButton, self.periodedelbutton)
        parent.ctrls.append(self)
        sizer2 = wx.BoxSizer(wx.HORIZONTAL)
 
        date_debut = AutoDateCtrl(parent, instance, member+'[self.parent.periode].debut')
        sizer2.AddMany([(wx.StaticText(parent, -1, u'Début :'), 0, wx.ALIGN_CENTER_VERTICAL), date_debut])

src/n/e/neveredit-HEAD/trunk/neveredit/ui/HAKListControl.py   neveredit(Download)
class HAKListControl(wx.BoxSizer) :
# This is a control with two ListBox-es. In one of them, avaible HAKs,
# and in the other, the HAKs that are "included" in the Module.
# One can put one hak from one of those ListBox-es to the other one using
# the |->| and |<-| buttons (arrow pixmaps and wxBitmapButton would be nicer)
# Then, one can set the HAK order in the Module using "up" and "down" buttons
# (the higher the HAK is in the ListBox, the higher is its priority).
    def __init__(self, prop, propWindow) :
        wx.BoxSizer.__init__(self,wx.VERTICAL)
        self.prop = prop
        self.propWindow = propWindow
 
        exterior_sizer = wx.BoxSizer(wx.HORIZONTAL)
        arrows_sizer = wx.BoxSizer(wx.VERTICAL)
        updown_sizer = wx.BoxSizer(wx.VERTICAL)
        usedhaks_sizer = wx.BoxSizer(wx.VERTICAL)
        nonused_sizer = wx.BoxSizer(wx.VERTICAL)

src/g/e/gertrude-HEAD/Controls.py   gertrude(Download)
class PeriodeChoice(wx.BoxSizer):
    def __init__(self, parent, instance, member, constructor):
        wx.BoxSizer.__init__(self, wx.VERTICAL)
        self.parent = parent
        self.parent.periode = 0
        self.constructor = constructor
 
        sizer1 = wx.BoxSizer(wx.HORIZONTAL)
        parent.Bind(wx.EVT_BUTTON, self.EvtPeriodeAddButton, self.periodeaddbutton)
        parent.Bind(wx.EVT_BUTTON, self.EvtPeriodeDelButton, self.periodedelbutton)
        parent.ctrls.append(self)
        sizer2 = wx.BoxSizer(wx.HORIZONTAL)
 
        date_debut = AutoDateCtrl(parent, instance, member+'[self.parent.periode].debut')
        sizer2.AddMany([(wx.StaticText(parent, -1, u'Début :'), 0, wx.ALIGN_CENTER_VERTICAL), date_debut])

src/n/e/neveredit-HEAD/neveredit/ui/HAKListControl.py   neveredit(Download)
class HAKListControl(wx.BoxSizer) :
# This is a control with two ListBox-es. In one of them, avaible HAKs,
# and in the other, the HAKs that are "included" in the Module.
# One can put one hak from one of those ListBox-es to the other one using
# the |->| and |<-| buttons (arrow pixmaps and wxBitmapButton would be nicer)
# Then, one can set the HAK order in the Module using "up" and "down" buttons
# (the higher the HAK is in the ListBox, the higher is its priority).
    def __init__(self, prop, propWindow) :
        wx.BoxSizer.__init__(self,wx.VERTICAL)
        self.prop = prop
        self.propWindow = propWindow
 
        exterior_sizer = wx.BoxSizer(wx.HORIZONTAL)
        arrows_sizer = wx.BoxSizer(wx.VERTICAL)
        updown_sizer = wx.BoxSizer(wx.VERTICAL)
        usedhaks_sizer = wx.BoxSizer(wx.VERTICAL)
        nonused_sizer = wx.BoxSizer(wx.VERTICAL)

src/f/r/freeems-tuner-HEAD/gui/realtimeDataInterface.py   freeems-tuner(Download)
class realtimeDataInterface(wx.BoxSizer):
 
    ID_LOGGING_TOGGLE = wx.NewId()
 
    # Vars to display (and their order)
    # Comment out lines here to hide them in the interface
    display = [
        self.toggle.Bind(wx.EVT_BUTTON, self.toggleLogging, id=self.ID_LOGGING_TOGGLE)
 
        # Locating elements
        sizer6 = wx.BoxSizer(wx.HORIZONTAL)
        sizer6.Add(self.logging_type, 10, wx.EXPAND)
        sizer6.Add(blank, 1)
        sizer6.Add(self.toggle, 10, wx.EXPAND)
 
        sizer5 = wx.BoxSizer(wx.VERTICAL)
        sizer5.Add(sizer6, 1)
        sizer5.Add(blank, 12)
 
        # Var display
        sizer4 = wx.BoxSizer(wx.VERTICAL)
        sizer4.Add(blank, 1)
 
        # Title display
        sizer2 = wx.BoxSizer(wx.VERTICAL)
        sizer2.Add(blank, 1)
 
        # Generate display
            # Save references to controls in list
            self._display_controls[key] = text
 
        sizer1 = wx.BoxSizer(wx.HORIZONTAL)
        sizer1.Add(blank, 1)
        sizer1.Add(sizer4, 10, wx.EXPAND)
        sizer1.Add(blank, 1)

src/n/e/neveredit-HEAD/trunk/neveredit/ui/PropWindow.py   neveredit(Download)
class CExoLocStringControl(wx.BoxSizer):
    def __init__(self,typeSpec,prop,propWindow, defaultlang=0):
        # the defaultlang parameter should be the BIOWARE code for the language
        # see file/Language or Bioware documentation for those codes
        wx.BoxSizer.__init__(self,wx.VERTICAL)
 
        langChoices = neveredit.file.Language.BIOorderedLangs
        self.gender = 0
        self.prop = prop
 
        insideHorizSizer = wx.BoxSizer(wx.VERTICAL)
        choiceSizer = wx.BoxSizer(wx.VERTICAL)
 
        if len(typeSpec) > 1 and int(typeSpec[1]) > 1:

src/n/e/neveredit-HEAD/neveredit/ui/PropWindow.py   neveredit(Download)
class CExoLocStringControl(wx.BoxSizer):
    def __init__(self,typeSpec,prop,propWindow, defaultlang=0):
        # the defaultlang parameter should be the BIOWARE code for the language
        # see file/Language or Bioware documentation for those codes
        wx.BoxSizer.__init__(self,wx.VERTICAL)
 
        langChoices = neveredit.file.Language.BIOorderedLangs
        self.gender = 0
        self.prop = prop
 
        insideHorizSizer = wx.BoxSizer(wx.VERTICAL)
        choiceSizer = wx.BoxSizer(wx.VERTICAL)
 
        if len(typeSpec) > 1 and int(typeSpec[1]) > 1:

src/f/r/freeems-tuner-HEAD/gui/memoryRequestBlockIdDropMenu.py   freeems-tuner(Download)
class memoryRequestBlockIdDropMenu(wx.BoxSizer):
 
    options = {}
    text = None
    text2 = None
    input = None
    input2 = None
 
        self.send.Bind(wx.EVT_BUTTON, self.sendRequest, id=self.ID_SEND_REQUEST)
 
        sizer4 = wx.BoxSizer(wx.HORIZONTAL)
        sizer4.Add((0,0), 1)
        sizer4.Add(self.send, 18, wx.EXPAND)
        sizer4.Add((0,0), 1)
 
        sizer5 = wx.BoxSizer(wx.VERTICAL)
        sizer5.Add((0,0), 1)
        sizer5.Add(sizer4, 18, wx.EXPAND)
        sizer5.Add((0,0), 1)
 
        sizer3 = wx.BoxSizer(wx.VERTICAL)
        sizer3.Add(self.input2, 5, wx.EXPAND)
        sizer3.Add((0,0), 1)
 
        sizer2 = wx.BoxSizer(wx.VERTICAL)
        sizer2.Add((0,0), 1)
        sizer2.Add(self.text, 3, wx.EXPAND)
        sizer2.Add((0,0), 1)
        sizer2.Add(self.input, 5, wx.EXPAND)
        sizer2.Add((0,0), 1)
 
        sizer1 = wx.BoxSizer(wx.HORIZONTAL)

src/n/e/neveredit-HEAD/trunk/neveredit/ui/VarTableControl.py   neveredit(Download)
class VarControl(wx.BoxSizer):
 
    def __init__(self,owner,parent,pname,ptype,pvalue):
        if ptype in [2,4,5]:
            return
        wx.BoxSizer.__init__(self,wx.HORIZONTAL)
        self.owner = owner
        self.dataType = ptype
        self.parent = parent
        valid_types = [_('integer'),_('float'),_('string'),\
                                            _('object'),_('location')]
        self.control_memory = {self.dataType:pvalue}
 
        self.left_sizer = wx.BoxSizer(wx.HORIZONTAL)
class VarListControl(wx.BoxSizer):
 
    def __init__(self,prop,parent):
        wx.BoxSizer.__init__(self,wx.VERTICAL)
        self.commands_sizer = wx.BoxSizer(wx.HORIZONTAL)
        self.parent = parent
 
        self.Add(self.commands_sizer)
        wx.EVT_BUTTON(parent,self.addBtn.GetId(),self.addBtnPressed)
 
        self.varControls_sizer = wx.BoxSizer(wx.VERTICAL)
        self.Add(self.varControls_sizer)
        self.addVarControls(prop.getValue())
 

  1 | 2 | 3  Next