wx.StaticBox and siblings creation order, and other fixes from Kevin Ollivier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -10,6 +10,13 @@ class TestPanel( wx.Panel ):
|
||||
self.log = log
|
||||
panel = wx.Panel( self, -1 )
|
||||
|
||||
# Layout controls on panel:
|
||||
vs = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
box1_title = wx.StaticBox( panel, -1, "Group 1" )
|
||||
box1 = wx.StaticBoxSizer( box1_title, wx.VERTICAL )
|
||||
grid1 = wx.FlexGridSizer( 0, 2, 0, 0 )
|
||||
|
||||
# 1st group of controls:
|
||||
self.group1_ctrls = []
|
||||
radio1 = wx.RadioButton( panel, -1, " Radio1 ", style = wx.RB_GROUP )
|
||||
@@ -22,25 +29,6 @@ class TestPanel( wx.Panel ):
|
||||
self.group1_ctrls.append((radio2, text2))
|
||||
self.group1_ctrls.append((radio3, text3))
|
||||
|
||||
# 2nd group of controls:
|
||||
self.group2_ctrls = []
|
||||
radio4 = wx.RadioButton( panel, -1, " Radio1 ", style = wx.RB_GROUP )
|
||||
radio5 = wx.RadioButton( panel, -1, " Radio2 " )
|
||||
radio6 = wx.RadioButton( panel, -1, " Radio3 " )
|
||||
text4 = wx.TextCtrl( panel, -1, "" )
|
||||
text5 = wx.TextCtrl( panel, -1, "" )
|
||||
text6 = wx.TextCtrl( panel, -1, "" )
|
||||
self.group2_ctrls.append((radio4, text4))
|
||||
self.group2_ctrls.append((radio5, text5))
|
||||
self.group2_ctrls.append((radio6, text6))
|
||||
|
||||
# Layout controls on panel:
|
||||
vs = wx.BoxSizer( wx.VERTICAL )
|
||||
|
||||
box1_title = wx.StaticBox( panel, -1, "Group 1" )
|
||||
box1 = wx.StaticBoxSizer( box1_title, wx.VERTICAL )
|
||||
grid1 = wx.FlexGridSizer( 0, 2, 0, 0 )
|
||||
|
||||
for radio, text in self.group1_ctrls:
|
||||
grid1.AddWindow( radio, 0, wx.ALIGN_CENTRE|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
|
||||
grid1.AddWindow( text, 0, wx.ALIGN_CENTRE|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
|
||||
@@ -52,6 +40,18 @@ class TestPanel( wx.Panel ):
|
||||
box2 = wx.StaticBoxSizer( box2_title, wx.VERTICAL )
|
||||
grid2 = wx.FlexGridSizer( 0, 2, 0, 0 )
|
||||
|
||||
# 2nd group of controls:
|
||||
self.group2_ctrls = []
|
||||
radio4 = wx.RadioButton( panel, -1, " Radio1 ", style = wx.RB_GROUP )
|
||||
radio5 = wx.RadioButton( panel, -1, " Radio2 " )
|
||||
radio6 = wx.RadioButton( panel, -1, " Radio3 " )
|
||||
text4 = wx.TextCtrl( panel, -1, "" )
|
||||
text5 = wx.TextCtrl( panel, -1, "" )
|
||||
text6 = wx.TextCtrl( panel, -1, "" )
|
||||
self.group2_ctrls.append((radio4, text4))
|
||||
self.group2_ctrls.append((radio5, text5))
|
||||
self.group2_ctrls.append((radio6, text6))
|
||||
|
||||
for radio, text in self.group2_ctrls:
|
||||
grid2.AddWindow( radio, 0, wx.ALIGN_CENTRE|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
|
||||
grid2.AddWindow( text, 0, wx.ALIGN_CENTRE|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
|
||||
|
Reference in New Issue
Block a user