All Samples(7690) | Call(7685) | Derive(0) | Import(5)
wx.Size is a useful data structure used to represent the size of something. It simply contains integer width and height properties. In most places in wxPython where a wx.Size is expected a (width, height) tuple can be used instead.
src/w/x/wxPython-In-Action-HEAD/BOA_demo/Examples/Everything.py wxPython-In-Action(Download)
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
pos=wx.Point(556, 295), size=wx.Size(516, 476),
style=wx.DEFAULT_FRAME_STYLE, title='Everything')
self._init_utils()
self.SetClientSize(wx.Size(508, 449))
self.SetMenuBar(self.menuBar1)
self.Center(wx.BOTH)
self.toolBar1 = wx.ToolBar(id=wxID_FRAME1TOOLBAR1, name='toolBar1',
parent=self, pos=wx.Point(0, 0), size=wx.Size(508, 27),
self.statusBar1 = wx.StatusBar(id=wxID_FRAME1STATUSBAR1,
name='statusBar1', parent=self, style=0)
self.statusBar1.SetPosition(wx.Point(0, 308))
self.statusBar1.SetSize(wx.Size(422, 20))
self._init_coll_statusBar1_Fields(self.statusBar1)
self.SetStatusBar(self.statusBar1)
self.notebook1 = wx.Notebook(id=wxID_FRAME1NOTEBOOK1, name='notebook1',
parent=self, pos=wx.Point(0, 27), size=wx.Size(508, 383),
style=0)
self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1',
parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(500, 357),
self.splitterWindow1 = wx.SplitterWindow(id=wxID_FRAME1SPLITTERWINDOW1,
name='splitterWindow1', parent=self.panel1, point=wx.Point(8, 8),
size=wx.Size(200, 100), style=wx.SP_3D)
self.scrolledWindow1 = wx.ScrolledWindow(id=wxID_FRAME1SCROLLEDWINDOW1,
name='scrolledWindow1', parent=self.splitterWindow1,
pos=wx.Point(2, 2), size=wx.Size(98, 96),
style=wx.SUNKEN_BORDER | wx.TAB_TRAVERSAL)
self.scrolledWindow1.SetToolTipString('wxScrolledWindow')
self.sashWindow1 = wx.SashWindow(id=wxID_FRAME1SASHWINDOW1,
name='sashWindow1', parent=self.splitterWindow1, pos=wx.Point(107,
2), size=wx.Size(91, 96), style=wx.CLIP_CHILDREN | wx.SW_3D)
self.sashLayoutWindow1 = wx.SashLayoutWindow(id=wxID_FRAME1SASHLAYOUTWINDOW1,
name='sashLayoutWindow1', parent=self.panel1, pos=wx.Point(8,
120), size=wx.Size(200, 80), style=wx.CLIP_CHILDREN | wx.SW_3D)
self.window1 = wx.Window(id=wxID_FRAME1WINDOW1, name='window1',
parent=self.panel1, pos=wx.Point(216, 120), size=wx.Size(96, 80),
style=wx.SIMPLE_BORDER)
self.window1.SetCursor(self.stockCursor1)
self.dynamicSashWindow1 = wx.gizmos.DynamicSashWindow(id=wxID_FRAME1DYNAMICSASHWINDOW1,
name='dynamicSashWindow1', parent=self.panel1, pos=wx.Point(216,
8), size=wx.Size(100, 100), style=wx.CLIP_CHILDREN)
8), size=wx.Size(100, 100), style=wx.CLIP_CHILDREN)
self.panel2 = wx.Panel(id=wxID_FRAME1PANEL2, name='panel2',
parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(500, 357),
style=wx.TAB_TRAVERSAL)
self.staticText1 = wx.StaticText(id=wxID_FRAME1STATICTEXT1,
label='staticText1', name='staticText1', parent=self.panel2,
pos=wx.Point(16, 16), size=wx.Size(52, 13), style=0)
self.textCtrl1 = wx.TextCtrl(id=wxID_FRAME1TEXTCTRL1, name='textCtrl1',
parent=self.panel2, pos=wx.Point(16, 40), size=wx.Size(100, 21),
self.comboBox1 = wx.ComboBox(choices=[], id=wxID_FRAME1COMBOBOX1,
name='comboBox1', parent=self.panel2, pos=wx.Point(16, 72),
size=wx.Size(125, 21), style=0, validator=wx.DefaultValidator,
value='comboBox1')
self.choice1 = wx.Choice(choices=[], id=wxID_FRAME1CHOICE1,
name='choice1', parent=self.panel2, pos=wx.Point(16, 104),
size=wx.Size(125, 21), style=0, validator=wx.DefaultValidator)
self.checkBox1 = wx.CheckBox(id=wxID_FRAME1CHECKBOX1, label='checkBox1',
name='checkBox1', parent=self.panel2, pos=wx.Point(16, 136),
size=wx.Size(73, 13), style=0)
self.radioButton1 = wx.RadioButton(id=wxID_FRAME1RADIOBUTTON1,
label='radioButton1', name='radioButton1', parent=self.panel2,
pos=wx.Point(16, 160), size=wx.Size(80, 20), style=0)
self.slider1 = wx.Slider(id=wxID_FRAME1SLIDER1, maxValue=100,
minValue=0, name='slider1', parent=self.panel2,
point=wx.Point(152, 16), size=wx.Size(136, 20),
style=wx.SL_HORIZONTAL, validator=wx.DefaultValidator, value=0)
self.slider1.Bind(wx.EVT_SCROLL, self.OnSlider1Slider)
self.scrollBar1 = wx.ScrollBar(id=wxID_FRAME1SCROLLBAR1,
name='scrollBar1', parent=self.panel2, pos=wx.Point(16, 192),
size=wx.Size(120, 14), style=wx.SB_HORIZONTAL)
self.staticBitmap1 = wx.StaticBitmap(bitmap=Everything_img.getBoaBitmap(),
id=wxID_FRAME1STATICBITMAP1, name='staticBitmap1',
parent=self.panel2, pos=wx.Point(160, 136), size=wx.Size(16, 16),
style=0)
self.staticLine1 = wx.StaticLine(id=wxID_FRAME1STATICLINE1,
name='staticLine1', parent=self.panel2, pos=wx.Point(15, 216),
size=wx.Size(121, 2), style=0)
self.staticBox1 = wx.StaticBox(id=wxID_FRAME1STATICBOX1,
label='staticBox1', name='staticBox1', parent=self.panel2,
pos=wx.Point(152, 120), size=wx.Size(144, 40), style=0)
self.htmlWindow1 = wx.html.HtmlWindow(id=wxID_FRAME1HTMLWINDOW1,
name='htmlWindow1', parent=self.panel2, pos=wx.Point(152, 168),
size=wx.Size(144, 80), style=wx.html.HW_SCROLLBAR_AUTO)
self.lEDNumberCtrl1 = wx.gizmos.LEDNumberCtrl(id=wxID_FRAME1LEDNUMBERCTRL1,
parent=self.panel2, pos=wx.Point(152, 40), size=wx.Size(136, 40),
style=wx.gizmos.LED_ALIGN_CENTER)
self.lEDNumberCtrl1.SetValue('123')
self.panel3 = wx.Panel(id=wxID_FRAME1PANEL3, name='panel3',
parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(500, 357),
self.button1 = wx.Button(id=wxID_FRAME1BUTTON1, label='button1',
name='button1', parent=self.panel3, pos=wx.Point(16, 16),
size=wx.Size(75, 23), style=0)
self.button1.Bind(wx.EVT_BUTTON, self.OnButton1Button,
id=wxID_FRAME1BUTTON1)
self.button1.Bind(wx.EVT_LEFT_UP, self.OnButton1LeftUp)
self.bitmapButton1 = wx.BitmapButton(bitmap=Everything_img.getBoaBitmap(),
id=wxID_FRAME1BITMAPBUTTON1, name='bitmapButton1',
parent=self.panel3, pos=wx.Point(16, 56), size=wx.Size(72, 24),
self.spinButton1 = wx.SpinButton(id=wxID_FRAME1SPINBUTTON1,
name='spinButton1', parent=self.panel3, pos=wx.Point(136, 96),
size=wx.Size(32, 16), style=wx.SP_HORIZONTAL)
self.spinButton1.Bind(wx.EVT_COMMAND_SCROLL,
self.OnSpinbutton1CommandScroll, id=wxID_FRAME1SPINBUTTON1)
self.toggleButton1 = wx.ToggleButton(id=wxID_FRAME1TOGGLEBUTTON1,
label='toggleButton1', name='toggleButton1', parent=self.panel3,
pos=wx.Point(104, 16), size=wx.Size(81, 23), style=0)
self.genButton1 = wx.lib.buttons.GenButton(ID=wxID_FRAME1GENBUTTON1,
label='genButton1', name='genButton1', parent=self.panel3,
pos=wx.Point(16, 160), size=wx.Size(88, 37), style=0)
self.genBitmapButton1 = wx.lib.buttons.GenBitmapButton(ID=wxID_FRAME1GENBITMAPBUTTON1,
bitmap=Everything_img.getBoaBitmap(), name='genBitmapButton1',
parent=self.panel3, pos=wx.Point(16, 192), size=wx.Size(59, 58),
style=0)
self.genToggleButton1 = wx.lib.buttons.GenToggleButton(ID=wxID_FRAME1GENTOGGLEBUTTON1,
label='genToggleButton1', name='genToggleButton1',
parent=self.panel3, pos=wx.Point(104, 160), size=wx.Size(113, 37),
self.genBitmapToggleButton1 = wx.lib.buttons.GenBitmapToggleButton(ID=wxID_FRAME1GENBITMAPTOGGLEBUTTON1,
bitmap=Everything_img.getBoaBitmap(),
name='genBitmapToggleButton1', parent=self.panel3,
pos=wx.Point(72, 192), size=wx.Size(59, 58), style=0)
self.genBitmapTextToggleButton1 = wx.lib.buttons.GenBitmapTextToggleButton(ID=wxID_FRAME1GENBITMAPTEXTTOGGLEBUTTON1,
bitmap=Everything_img.getBoaBitmap(),
label='genBitmapTextToggleButton1',
name='genBitmapTextToggleButton1', parent=self.panel3,
pos=wx.Point(128, 192), size=wx.Size(88, 58), style=0)
self.contextHelpButton1 = wx.ContextHelpButton(parent=self.panel3,
pos=wx.Point(136, 64), size=wx.Size(20, 19),
style=wx.BU_AUTODRAW)
self.panel4 = wx.Panel(id=wxID_FRAME1PANEL4, name='panel4',
parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(500, 357),
style=wx.TAB_TRAVERSAL)
self.radioBox1 = wx.RadioBox(choices=['asd'], id=wxID_FRAME1RADIOBOX1,
label='radioBox1', majorDimension=1, name='radioBox1',
parent=self.panel4, point=wx.Point(16, 16), size=wx.DefaultSize,
style=wx.RA_SPECIFY_COLS, validator=wx.DefaultValidator)
self.listBox1 = wx.ListBox(choices=[], id=wxID_FRAME1LISTBOX1,
name='listBox1', parent=self.panel4, pos=wx.Point(16, 64),
size=wx.Size(115, 63), style=0, validator=wx.DefaultValidator)
self.checkListBox1 = wx.CheckListBox(choices=[],
id=wxID_FRAME1CHECKLISTBOX1, name='checkListBox1',
parent=self.panel4, pos=wx.Point(16, 136), size=wx.Size(115, 63),
style=0, validator=wx.DefaultValidator)
self.grid1 = wx.grid.Grid(id=wxID_FRAME1GRID1, name='grid1',
parent=self.panel4, pos=wx.Point(144, 16), size=wx.Size(128, 112),
style=0)
self.listCtrl1 = wx.ListCtrl(id=wxID_FRAME1LISTCTRL1, name='listCtrl1',
parent=self.panel4, pos=wx.Point(280, 16), size=wx.Size(100, 30),
style=wx.LC_ICON, validator=wx.DefaultValidator)
self.treeCtrl1 = wx.TreeCtrl(id=wxID_FRAME1TREECTRL1, name='treeCtrl1',
parent=self.panel4, pos=wx.Point(280, 56), size=wx.Size(100, 80),
style=wx.TR_HAS_BUTTONS, validator=wx.DefaultValidator)
self.editableListBox1 = wx.gizmos.EditableListBox(id=wxID_FRAME1EDITABLELISTBOX1,
label='editableListBox1', name='editableListBox1',
parent=self.panel4, pos=wx.Point(152, 152), size=wx.Size(200,
100))
self.panel5 = wx.Panel(id=wxID_FRAME1PANEL5, name='panel5',
parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(500, 357),
self.panel5.SetAutoLayout(True)
self.window2 = wx.Window(id=wxID_FRAME1WINDOW2, name='window2',
parent=self.panel5, pos=wx.Point(446, 16), size=wx.Size(40, 40),
style=0)
self.window2.SetBackgroundColour(wx.Colour(128, 255, 0))
self.window2.SetConstraints(LayoutAnchors(self.window2, False, True,
True, False))
self.window3 = wx.Window(id=wxID_FRAME1WINDOW3, name='window3',
parent=self.panel5, pos=wx.Point(16, 299), size=wx.Size(40, 40),
False, True))
self.window4 = wx.Window(id=wxID_FRAME1WINDOW4, name='window4',
parent=self.panel5, pos=wx.Point(446, 299), size=wx.Size(40, 40),
style=0)
self.window4.SetBackgroundColour(wx.Colour(128, 255, 0))
self.window4.SetConstraints(LayoutAnchors(self.window4, False, False,
True, True))
self.window5 = wx.Window(id=wxID_FRAME1WINDOW5, name='window5',
parent=self.panel5, pos=wx.Point(16, 16), size=wx.Size(40, 40),
False, False))
self.window6 = wx.Window(id=wxID_FRAME1WINDOW6, name='window6',
parent=self.panel5, pos=wx.Point(192, 16), size=wx.Size(126, 40),
style=0)
self.window6.SetBackgroundColour(wx.Colour(128, 255, 0))
self.window6.SetConstraints(LayoutAnchors(self.window6, True, True,
True, False))
self.window7 = wx.Window(id=wxID_FRAME1WINDOW7, name='window7',
parent=self.panel5, pos=wx.Point(446, 120), size=wx.Size(40, 115),
True, True))
self.window8 = wx.Window(id=wxID_FRAME1WINDOW8, name='window8',
parent=self.panel5, pos=wx.Point(192, 299), size=wx.Size(126, 40),
style=0)
self.window8.SetBackgroundColour(wx.Colour(128, 255, 0))
self.window8.SetConstraints(LayoutAnchors(self.window8, True, False,
True, True))
self.window9 = wx.Window(id=wxID_FRAME1WINDOW9, name='window9',
parent=self.panel5, pos=wx.Point(16, 120), size=wx.Size(40, 115),
False, True))
self.window10 = wx.Window(id=wxID_FRAME1WINDOW10, name='window10',
parent=self.panel5, pos=wx.Point(225, 147), size=wx.Size(40, 40),
style=0)
self.window10.SetBackgroundColour(wx.Colour(128, 255, 0))
self.window10.SetConstraints(LayoutAnchors(self.window10, False, False,
False, False))
self.panel6 = wx.Panel(id=wxID_FRAME1PANEL6, name='panel6',
parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(500, 357),
self.gauge1 = wx.Gauge(id=wxID_FRAME1GAUGE1, name='gauge1',
parent=self.panel2, pos=wx.Point(152, 88), range=100,
size=wx.Size(136, 16), style=wx.GA_SMOOTH | wx.GA_HORIZONTAL,
validator=wx.DefaultValidator)
self.gauge1.SetValue(50)
src/w/x/wxPython-In-Action-HEAD/BOA_demo/Examples/layout/SashLayout.py wxPython-In-Action(Download)
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Frame.__init__(self, id=wxID_FRAME1, name='Frame1', parent=prnt,
pos=wx.Point(327, 136), size=wx.Size(518, 376),
style=wx.DEFAULT_FRAME_STYLE, title='Sash layout')
self.SetClientSize(wx.Size(510, 349))
self.Bind(wx.EVT_SIZE, self.OnWxframe1Size)
self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1', parent=self,
pos=wx.Point(248, 50), size=wx.Size(262, 234),
self.sashLayoutWindow1 = wx.SashLayoutWindow(id=wxID_FRAME1SASHLAYOUTWINDOW1,
name='sashLayoutWindow1', parent=self, pos=wx.Point(0, 0),
size=wx.Size(510, 50), style=wx.CLIP_CHILDREN | wx.SW_3D)
self.sashLayoutWindow1.SetBackgroundColour(wx.Colour(255, 0, 0))
self.sashLayoutWindow1.SetOrientation(wx.LAYOUT_HORIZONTAL)
self.sashLayoutWindow1.SetAlignment(wx.LAYOUT_TOP)
self.sashLayoutWindow1.SetSashVisible(wx.SASH_BOTTOM, True)
self.sashLayoutWindow1.SetDefaultSize(wx.Size(510, 50))
self.sashLayoutWindow4 = wx.SashLayoutWindow(id=wxID_FRAME1SASHLAYOUTWINDOW4,
name='sashLayoutWindow4', parent=self, pos=wx.Point(0, 284),
size=wx.Size(510, 65), style=wx.CLIP_CHILDREN | wx.SW_3D)
self.sashLayoutWindow4.SetBackgroundColour(wx.Colour(0, 0, 255))
self.sashLayoutWindow4.SetAlignment(wx.LAYOUT_BOTTOM)
self.sashLayoutWindow4.SetSashVisible(wx.SASH_TOP, True)
self.sashLayoutWindow4.SetOrientation(wx.LAYOUT_HORIZONTAL)
self.sashLayoutWindow4.SetDefaultSize(wx.Size(308, 65))
self.sashLayoutWindow2 = wx.SashLayoutWindow(id=wxID_FRAME1SASHLAYOUTWINDOW2,
name='sashLayoutWindow2', parent=self, pos=wx.Point(0, 50),
size=wx.Size(112, 234), style=wx.CLIP_CHILDREN | wx.SW_3D)
self.sashLayoutWindow2.SetBackgroundColour(wx.Colour(128, 255, 0))
self.sashLayoutWindow2.SetExtraBorderSize(20)
self.sashLayoutWindow2.SetAlignment(wx.LAYOUT_LEFT)
self.sashLayoutWindow2.SetOrientation(wx.LAYOUT_VERTICAL)
self.sashLayoutWindow2.SetSashVisible(wx.SASH_RIGHT, True)
self.sashLayoutWindow2.SetDefaultSize(wx.Size(112, 113))
self.sashLayoutWindow3 = wx.SashLayoutWindow(id=wxID_FRAME1SASHLAYOUTWINDOW3,
name='sashLayoutWindow3', parent=self, pos=wx.Point(112, 50),
size=wx.Size(136, 234), style=wx.CLIP_CHILDREN | wx.SW_3D)
self.sashLayoutWindow3.SetBackgroundColour(wx.Colour(0, 255, 255))
self.sashLayoutWindow3.SetAlignment(wx.LAYOUT_LEFT)
self.sashLayoutWindow3.SetOrientation(wx.LAYOUT_VERTICAL)
self.sashLayoutWindow3.SetSashVisible(wx.SASH_RIGHT, True)
self.sashLayoutWindow3.SetDefaultSize(wx.Size(136, 234))
self.textCtrl1 = wx.TextCtrl(id=wxID_FRAME1TEXTCTRL1, name='textCtrl1',
parent=self.sashLayoutWindow2, pos=wx.Point(20, 20),
size=wx.Size(69, 194), style=0, value='textCtrl1')
self.staticText1 = wx.StaticText(id=wxID_FRAME1STATICTEXT1,
label='staticText1', name='staticText1', parent=self.panel1,
pos=wx.Point(16, 16), size=wx.Size(52, 13), style=0)
self.textCtrl2 = wx.TextCtrl(id=wxID_FRAME1TEXTCTRL2, name='textCtrl2',
parent=self.sashLayoutWindow4, pos=wx.Point(10, 13),
size=wx.Size(490, 42), style=0, value='textCtrl2')
def OnSashlayoutwindow1SashDragged(self, event):
if self.checkStatusRange(event):
self.sashLayoutWindow1.SetDefaultSize(wx.Size(1000, event.GetDragRect().height))
self.doLayout()
def OnSashlayoutwindow2SashDragged(self, event):
if self.checkStatusRange(event):
self.sashLayoutWindow2.SetDefaultSize(wx.Size(event.GetDragRect().width, 1000))
self.doLayout()
def OnSashlayoutwindow3SashDragged(self, event):
if self.checkStatusRange(event):
self.sashLayoutWindow3.SetDefaultSize(wx.Size(event.GetDragRect().width, 1000))
def OnSashlayoutwindow4SashDragged(self, event):
if self.checkStatusRange(event):
self.sashLayoutWindow4.SetDefaultSize(wx.Size(1000, event.GetDragRect().height))
self.doLayout()
if __name__ == '__main__':
src/w/x/wxPython-In-Action-HEAD/BOA_demo/Examples/guide/AddressEntry.py wxPython-In-Action(Download)
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Frame.__init__(self, id=wxID_ADDRESSENTRY, name='AddressEntry',
parent=prnt, pos=wx.Point(816, 236), size=wx.Size(445, 355),
style=wx.DEFAULT_FRAME_STYLE, title='Address entry form')
self.SetClientSize(wx.Size(429, 319))
self.panel1 = wx.Panel(id=wxID_ADDRESSENTRYPANEL1, name='panel1',
parent=self, pos=wx.Point(0, 0), size=wx.Size(429, 319),
style=wx.TAB_TRAVERSAL)
self.listCtrl1 = wx.ListCtrl(id=wxID_ADDRESSENTRYLISTCTRL1,
name='listCtrl1', parent=self.panel1, pos=wx.Point(2, 2),
size=wx.Size(425, 87), style=wx.LC_REPORT)
self.stFirstName = wx.StaticText(id=wxID_ADDRESSENTRYSTFIRSTNAME,
label='First name', name='stFirstName', parent=self.panel1,
pos=wx.Point(2, 97), size=wx.Size(51, 13), style=0)
self.firstName = wx.TextCtrl(id=wxID_ADDRESSENTRYFIRSTNAME,
name='firstName', parent=self.panel1, pos=wx.Point(61, 93),
size=wx.Size(366, 21), style=0, value='')
self.stLastName = wx.StaticText(id=wxID_ADDRESSENTRYSTLASTNAME,
label='Last name', name='stLastName', parent=self.panel1,
pos=wx.Point(2, 122), size=wx.Size(55, 13), style=0)
self.lastName = wx.TextCtrl(id=wxID_ADDRESSENTRYLASTNAME,
name='lastName', parent=self.panel1, pos=wx.Point(61, 118),
size=wx.Size(366, 21), style=0, value='')
self.stAddress = wx.StaticText(id=wxID_ADDRESSENTRYSTADDRESS,
label='Address', name='stAddress', parent=self.panel1,
pos=wx.Point(2, 172), size=wx.Size(55, 13), style=0)
self.address = wx.TextCtrl(id=wxID_ADDRESSENTRYADDRESS, name='address',
parent=self.panel1, pos=wx.Point(61, 143), size=wx.Size(366, 72),
self.stPostal = wx.StaticText(id=wxID_ADDRESSENTRYSTPOSTAL,
label='Postal', name='stPostal', parent=self.panel1,
pos=wx.Point(2, 223), size=wx.Size(55, 13), style=0)
self.postal = wx.TextCtrl(id=wxID_ADDRESSENTRYPOSTAL, name='postal',
parent=self.panel1, pos=wx.Point(61, 219), size=wx.Size(366, 21),
style=0, value='')
self.stCity = wx.StaticText(id=wxID_ADDRESSENTRYSTCITY, label='City',
name='stCity', parent=self.panel1, pos=wx.Point(2, 248),
size=wx.Size(55, 13), style=0)
size=wx.Size(55, 13), style=0)
self.City = wx.TextCtrl(id=wxID_ADDRESSENTRYCITY, name='city',
parent=self.panel1, pos=wx.Point(61, 244), size=wx.Size(366, 21),
style=0, value='')
self.stCountry = wx.StaticText(id=wxID_ADDRESSENTRYSTCOUNTRY,
label='Country', name='stCountry', parent=self.panel1,
pos=wx.Point(2, 273), size=wx.Size(55, 13), style=0)
self.Country = wx.TextCtrl(id=wxID_ADDRESSENTRYCOUNTRY, name='country',
parent=self.panel1, pos=wx.Point(61, 269), size=wx.Size(366, 21),
style=0, value='')
self.add = wx.Button(id=wx.ID_ADD, label='', name='add',
parent=self.panel1, pos=wx.Point(2, 294), size=wx.Size(75, 23),
style=0)
self.add.Bind(wx.EVT_BUTTON, self.OnAddButton, id=wxID_ADDRESSENTRYADD)
self.delete = wx.Button(id=wx.ID_DELETE, label='', name='delete',
parent=self.panel1, pos=wx.Point(81, 294), size=wx.Size(75, 23),
style=0)
self.save = wx.Button(id=wx.ID_SAVE, label='', name='save',
parent=self.panel1, pos=wx.Point(160, 294), size=wx.Size(75, 23),
style=0)
self.close = wx.Button(id=wx.ID_CLOSE, label='', name='close',
parent=self.panel1, pos=wx.Point(239, 294), size=wx.Size(75, 23),
style=0)
self._init_sizers()
src/w/x/wxPython-In-Action-HEAD/BOA_demo/Examples/guide/Dialog2.py wxPython-In-Action(Download)
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Dialog.__init__(self, id=wxID_DIALOG2, name='', parent=prnt,
pos=wx.Point(302, 249), size=wx.Size(597, 281),
style=wx.DEFAULT_DIALOG_STYLE, title='About Notebook')
self.SetClientSize(wx.Size(581, 245))
self.staticText1 = wx.StaticText(id=wxID_DIALOG2STATICTEXT1,
label='Notebook - Simple text editor.', name='staticText1',
parent=self, pos=wx.Point(4, 4), size=wx.Size(681, 24),
self.staticText2 = wx.StaticText(id=wxID_DIALOG2STATICTEXT2,
label='This is my first Boa Contstructor application',
name='staticText2', parent=self, pos=wx.Point(244, 32),
size=wx.Size(201, 13), style=0)
self.staticText2.SetBackgroundColour(wx.Colour(255, 255, 0))
self.staticBitmap1 = wx.StaticBitmap(bitmap=wx.Bitmap('Boa.jpg',
wx.BITMAP_TYPE_JPEG), id=wxID_DIALOG2STATICBITMAP1,
name='staticBitmap1', parent=self, pos=wx.Point(173, 53),
size=wx.Size(236, 157), style=0)
self.staticBitmap2 = wx.StaticBitmap(bitmap=wx.Bitmap('Debian.png',
wx.BITMAP_TYPE_PNG), id=wxID_DIALOG2STATICBITMAP2,
name='staticBitmap2', parent=self, pos=wx.Point(52, 116),
size=wx.Size(117, 31), style=0)
self.staticBitmap3 = wx.StaticBitmap(bitmap=wx.Bitmap('wxWidgetsButton.png',
wx.BITMAP_TYPE_PNG), id=wxID_DIALOG2STATICBITMAP3,
name='staticBitmap3', parent=self, pos=wx.Point(413, 107),
size=wx.Size(116, 49), style=0)
self.button1 = wx.Button(id=wxID_DIALOG2BUTTON1, label='Close',
name='button1', parent=self, pos=wx.Point(253, 218),
size=wx.Size(75, 23), style=0)
src/w/x/wxPython-In-Action-HEAD/BOA_demo/Examples/layout/SizersInBoa.py wxPython-In-Action(Download)
def _init_coll_staticBoxSizer1_Items(self, parent):
# generated method, don't edit
parent.AddSpacer(wx.Size(8,8), border=0, flag=wx.ALIGN_CENTER)
parent.AddWindow(self.button16, 0, border=0, flag=wx.ALIGN_CENTER)
parent.AddWindow(self.button17, 1, border=0, flag=wx.ALIGN_CENTER)
parent.AddWindow(self.button18, 0, border=0, flag=wx.ALIGN_CENTER)
parent.AddSpacer(wx.Size(8,8), border=0, flag=wx.ALIGN_CENTER)
def _init_coll_boxSizer2_Items(self, parent):
# generated method, don't edit
parent.AddWindow(self.button19, 0, border=8,
flag=wx.ALL | wx.ALIGN_CENTER)
parent.AddSpacer(wx.Size(16,16), border=0, flag=0)
parent.AddWindow(self.button20, 0, border=0, flag=wx.ALIGN_CENTER)
parent.AddSpacer(wx.Size(16,16), border=0, flag=0)
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Frame.__init__(self, id=wxID_FRAME1, name='Frame1', parent=prnt,
pos=wx.Point(585, 379), size=wx.Size(458, 307),
style=wx.DEFAULT_FRAME_STYLE, title='Sizer demo')
self.SetClientSize(wx.Size(450, 280))
self.Center(wx.BOTH)
self.notebook1 = wx.Notebook(id=wxID_FRAME1NOTEBOOK1, name='notebook1',
parent=self, pos=wx.Point(0, 0), size=wx.Size(450, 280), style=0)
self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1',
parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(442, 254),
self.button1 = wx.Button(id=wxID_FRAME1BUTTON1, label='button1',
name='button1', parent=self.panel1, pos=wx.Point(0, 0),
size=wx.Size(75, 23), style=0)
self.button2 = wx.Button(id=wxID_FRAME1BUTTON2, label='button2',
name='button2', parent=self.panel1, pos=wx.Point(183, 103),
size=wx.Size(75, 151), style=0)
self.button3 = wx.Button(id=wxID_FRAME1BUTTON3, label='button3',
name='button3', parent=self.panel1, pos=wx.Point(367, 80),
size=wx.Size(75, 23), style=0)
size=wx.Size(75, 23), style=0)
self.panel2 = wx.Panel(id=wxID_FRAME1PANEL2, name='panel2',
parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(442, 254),
style=wx.TAB_TRAVERSAL)
self.button4 = wx.Button(id=wxID_FRAME1BUTTON4, label='button4',
name='button4', parent=self.panel2, pos=wx.Point(0, 0),
size=wx.Size(75, 23), style=0)
self.button5 = wx.Button(id=wxID_FRAME1BUTTON5, label='button5',
name='button5', parent=self.panel2, pos=wx.Point(221, 0),
size=wx.Size(75, 23), style=0)
self.button6 = wx.Button(id=wxID_FRAME1BUTTON6, label='button6',
name='button6', parent=self.panel2, pos=wx.Point(0, 84),
size=wx.Size(75, 23), style=0)
self.button7 = wx.Button(id=wxID_FRAME1BUTTON7, label='button7',
name='button7', parent=self.panel2, pos=wx.Point(221, 84),
size=wx.Size(75, 23), style=0)
self.button8 = wx.Button(id=wxID_FRAME1BUTTON8, label='button8',
name='button8', parent=self.panel2, pos=wx.Point(0, 168),
size=wx.Size(75, 23), style=0)
self.button9 = wx.Button(id=wxID_FRAME1BUTTON9, label='button9',
name='button9', parent=self.panel2, pos=wx.Point(221, 168),
size=wx.Size(75, 23), style=0)
self.panel3 = wx.Panel(id=wxID_FRAME1PANEL3, name='panel3',
parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(442, 254),
style=wx.TAB_TRAVERSAL)
self.panel4 = wx.Panel(id=wxID_FRAME1PANEL4, name='panel4',
parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(442, 254),
self.staticBox1 = wx.StaticBox(id=wxID_FRAME1STATICBOX1,
label='staticBox1', name='staticBox1', parent=self.panel4,
pos=wx.Point(0, 0), size=wx.Size(442, 254), style=0)
self.button10 = wx.Button(id=wxID_FRAME1BUTTON10, label='button10',
name='button10', parent=self.panel3, pos=wx.Point(10, 10),
size=wx.Size(232, 191), style=0)
self.button11 = wx.Button(id=wxID_FRAME1BUTTON11, label='button11',
name='button11', parent=self.panel3, pos=wx.Point(262, 10),
size=wx.Size(75, 23), style=0)
self.button12 = wx.Button(id=wxID_FRAME1BUTTON12, label='button12',
name='button12', parent=self.panel3, pos=wx.Point(357, 10),
size=wx.Size(75, 23), style=0)
self.button13 = wx.Button(id=wxID_FRAME1BUTTON13, label='button13',
name='button13', parent=self.panel3, pos=wx.Point(88, 221),
size=wx.Size(75, 23), style=0)
self.button14 = wx.Button(id=wxID_FRAME1BUTTON14, label='button14',
name='button14', parent=self.panel3, pos=wx.Point(262, 221),
size=wx.Size(75, 23), style=0)
self.button15 = wx.Button(id=wxID_FRAME1BUTTON15, label='button15',
name='button15', parent=self.panel3, pos=wx.Point(357, 221),
size=wx.Size(75, 23), style=0)
self.button16 = wx.Button(id=wxID_FRAME1BUTTON16, label='button16',
name='button16', parent=self.panel4, pos=wx.Point(183, 25),
size=wx.Size(75, 23), style=0)
self.button17 = wx.Button(id=wxID_FRAME1BUTTON17, label='button17',
name='button17', parent=self.panel4, pos=wx.Point(161, 48),
size=wx.Size(120, 170), style=0)
self.button18 = wx.Button(id=wxID_FRAME1BUTTON18, label='button18',
name='button18', parent=self.panel4, pos=wx.Point(128, 218),
size=wx.Size(185, 23), style=0)
self.button19 = wx.Button(id=wxID_FRAME1BUTTON19, label='button19',
name='button19', parent=self.panel1, pos=wx.Point(70, 40),
size=wx.Size(75, 23), style=0)
self.button20 = wx.Button(id=wxID_FRAME1BUTTON20, label='button20',
name='button20', parent=self.panel1, pos=wx.Point(169, 23),
size=wx.Size(104, 57), style=0)
self.button21 = wx.Button(id=wxID_FRAME1BUTTON21, label='button21',
name='button21', parent=self.panel1, pos=wx.Point(297, 40),
size=wx.Size(75, 23), style=0)
self._init_coll_notebook1_Pages(self.notebook1)
src/w/x/wxPython-In-Action-HEAD/BOA_demo/Examples/guide/Dialog1.py wxPython-In-Action(Download)
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Dialog.__init__(self, id=wxID_DIALOG1, name='', parent=prnt,
pos=wx.Point(391, 117), size=wx.Size(398, 330),
style=wx.DEFAULT_DIALOG_STYLE, title='About Notebook')
self.SetClientSize(wx.Size(390, 296))
self.staticText1 = wx.StaticText(id=wxID_DIALOG1STATICTEXT1,
label='Note book - Simple Text Editor', name='staticText1',
parent=self, pos=wx.Point(80, 8), size=wx.Size(214, 20),
self.staticText2 = wx.StaticText(id=wxID_DIALOG1STATICTEXT2,
label='This is my first Boa Contstructor application',
name='staticText2', parent=self, pos=wx.Point(88, 40),
size=wx.Size(201, 13), style=0)
self.staticText2.SetBackgroundColour(wx.Colour(255, 255, 128))
self.staticBitmap1 = wx.StaticBitmap(bitmap=wx.Bitmap('Boa.jpg',
wx.BITMAP_TYPE_JPEG), id=wxID_DIALOG1STATICBITMAP1,
name='staticBitmap1', parent=self, pos=wx.Point(72, 80),
size=wx.Size(236, 157), style=0)
self.button1 = wx.Button(id=wxID_DIALOG1BUTTON1, label='Close',
name='button1', parent=self, pos=wx.Point(152, 248),
size=wx.Size(75, 23), style=0)
src/w/x/wxPython-In-Action-HEAD/BOA_demo/Examples/advanced/FramePanels/wxFrame1.py wxPython-In-Action(Download)
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Frame.__init__(self, id=wxID_WXFRAME1, name='', parent=prnt,
pos=wx.Point(306, 164), size=wx.Size(491, 364),
style=wx.DEFAULT_FRAME_STYLE, title='wxFrame1')
self.SetClientSize(wx.Size(483, 337))
self.notebook1 = wx.Notebook(id=wxID_WXFRAME1NOTEBOOK1, name='notebook1',
parent=self, pos=wx.Point(0, 0), size=wx.Size(483, 337), style=0)
self.panel1 = wxPanel1(id=wxID_WXFRAME1PANEL1, name='panel1',
parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(475, 311),
style=wx.TAB_TRAVERSAL)
self.panel2 = wxPanel2(id=wxID_WXFRAME1PANEL2, name='panel2',
parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(475, 311),
style=wx.TAB_TRAVERSAL)
self.panel3 = wx.Panel(id=wxID_WXFRAME1PANEL3, name='panel3',
parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(475, 311),
style=wx.TAB_TRAVERSAL)
self.panel4 = wxPanel3(id=wxID_WXFRAME1PANEL4, name='panel4',
parent=self.panel3, pos=wx.Point(16, 16), size=wx.Size(200, 100),
style=wx.RAISED_BORDER|wx.TAB_TRAVERSAL)
self.panel5 = wxPanel3(id=wxID_WXFRAME1PANEL5, name='panel5',
parent=self.panel3, pos=wx.Point(16, 136), size=wx.Size(200, 100),
style=wx.STATIC_BORDER|wx.TAB_TRAVERSAL)
self.panel6 = wxPanel3(id=wxID_WXFRAME1PANEL6, name='panel6',
parent=self.panel3, pos=wx.Point(232, 16), size=wx.Size(200, 100),
style=wx.SUNKEN_BORDER|wx.TAB_TRAVERSAL)
self.panel7 = wxPanel3(id=wxID_WXFRAME1PANEL7, name='panel7',
parent=self.panel3, pos=wx.Point(232, 136), size=wx.Size(200,
src/w/x/wxPython-In-Action-HEAD/BOA_demo/Examples/mdi/wxMDIParentFrame1.py wxPython-In-Action(Download)
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.MDIParentFrame.__init__(self, id=wxID_WXMDIPARENTFRAME1, name='',
parent=prnt, pos=wx.Point(129, 88), size=wx.Size(544, 318),
style=wx.DEFAULT_FRAME_STYLE | wx.VSCROLL | wx.HSCROLL,
title='wxMDIParentFrame1')
self._init_utils()
self.sashLayoutWindow1 = wx.SashLayoutWindow(id=wxID_WXMDIPARENTFRAME1SASHLAYOUTWINDOW1,
name='sashLayoutWindow1', parent=self, pos=wx.Point(0, 0),
size=wx.Size(137, 272), style=wx.CLIP_CHILDREN | wx.SW_3D)
self.sashLayoutWindow1.SetOrientation(wx.LAYOUT_VERTICAL)
self.sashLayoutWindow1.SetAlignment(wx.LAYOUT_LEFT)
self.sashLayoutWindow1.SetSashVisible(wx.SASH_RIGHT, True)
self.sashLayoutWindow1.SetDefaultSize(wx.Size(137, 272))
self.treeCtrl1 = wx.TreeCtrl(id=wxID_WXMDIPARENTFRAME1TREECTRL1,
name='treeCtrl1', parent=self.sashLayoutWindow1, pos=wx.Point(0,
0), size=wx.Size(134, 272), style=wx.TR_HAS_BUTTONS)
def __init__(self, parent):
self._init_ctrls(parent)
def OnSashlayoutwindow1SashDragged(self, event):
if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE:
return
eID = event.GetId()
if eID == wxID_WXMDIPARENTFRAME1SASHLAYOUTWINDOW1:
self.sashLayoutWindow1.SetDefaultSize(wx.Size(event.GetDragRect().width, 0))
src/w/x/wxPython-In-Action-HEAD/BOA_demo/Examples/images/ArtProvider/ArtProviderFrame.py wxPython-In-Action(Download)
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
pos=wx.Point(141, 122), size=wx.Size(270, 155),
style=wx.DEFAULT_FRAME_STYLE, title='ArtProvider Demo')
self.SetClientSize(wx.Size(262, 121))
self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1', parent=self,
pos=wx.Point(0, 0), size=wx.Size(262, 121),
self.bitmapButton1 = wx.BitmapButton(bitmap=wx.ArtProvider.GetBitmap('wxART_BOA_ICON',
wx.ART_TOOLBAR, wx.DefaultSize), id=wxID_FRAME1BITMAPBUTTON1,
name='bitmapButton1', parent=self.panel1, pos=wx.Point(168, 56),
size=wx.Size(32, 32), style=wx.BU_AUTODRAW)
self.bitmapButton2 = wx.BitmapButton(bitmap=wx.ArtProvider.GetBitmap('wxART_TIP',
wx.ART_TOOLBAR, wx.DefaultSize), id=wxID_FRAME1BITMAPBUTTON2,
name='bitmapButton2', parent=self.panel1, pos=wx.Point(56, 40),
size=wx.Size(56, 56), style=wx.BU_AUTODRAW)
self.staticText1 = wx.StaticText(id=wxID_FRAME1STATICTEXT1,
label='Standard ArtId', name='staticText1', parent=self.panel1,
pos=wx.Point(48, 16), size=wx.Size(73, 13), style=0)
self.staticText2 = wx.StaticText(id=wxID_FRAME1STATICTEXT2,
label='Custom ArtId', name='staticText2', parent=self.panel1,
pos=wx.Point(152, 16), size=wx.Size(65, 13), style=0)
def __init__(self, parent):
self._init_ctrls(parent)
src/w/x/wxPython-In-Action-HEAD/BOA_demo/Examples/advanced/SpecialAttributes/wxFrame1.py wxPython-In-Action(Download)
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Frame.__init__(self, id=wxID_WXFRAME1, name='', parent=prnt,
pos=wx.Point(286, 235), size=wx.Size(307, 300),
style=wx.DEFAULT_FRAME_STYLE, title=self.frameTitle)
self.SetClientSize(wx.Size(299, 273))
self.button1 = wx.Button(id=wxID_WXFRAME1BUTTON1,
label=self.buttonLabel, name='button1', parent=self,
pos=wx.Point(96, 104), size=wx.Size(104, 24), style=0)
self.textCtrl1 = wx.TextCtrl(id=wxID_WXFRAME1TEXTCTRL1,
name='textCtrl1', parent=self, pos=wx.Point(8, 8),
size=wx.Size(280, 72), style=0, value='textCtrl1')
self.splitterWindow1 = wx.SplitterWindow(id=wxID_WXFRAME1SPLITTERWINDOW1,
name='splitterWindow1', parent=self, point=wx.Point(8, 144),
size=wx.Size(280, 120), style=wx.SP_3D)
self.textCtrl2 = wx.TextCtrl(id=wxID_WXFRAME1TEXTCTRL2,
name='textCtrl2', parent=self.splitterWindow1, pos=wx.Point(2, 2),
size=wx.Size(138, 116), style=0, value='textCtrl2')
self.textCtrl3 = wx.TextCtrl(id=wxID_WXFRAME1TEXTCTRL3,
name='textCtrl3', parent=self.splitterWindow1, pos=wx.Point(147,
2), size=wx.Size(131, 116), style=0, value='textCtrl3')
self.splitterWindow1.SplitVertically(self.textCtrl2, self.textCtrl3,
self.splitSize)
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next