]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/tests/grid.py
1 from wxPython
.wx
import *
2 from wxPython
.lib
.grids
import wxFlexGridSizer
5 def __init__(self
, parent
=NULL
, id=-1, title
="test"):
6 wxFrame
.__init
__(self
, parent
, id, title
)
7 s
=wxBoxSizer(wxVERTICAL
)
8 gs
=wxFlexGridSizer(2, 2, 2, 2)
9 for label
in ('one', 'two', 'tree', 'four'):
10 gs
.Add(wxButton(self
, -1, label
, size
=(100,100)), 1, wxEXPAND
)
11 s
.Add(gs
, 1, wxEXPAND|wxALL
, 50)
13 self
.SetAutoLayout(TRUE
)
19 self
.SetTopWindow(frame
)