views:

112

answers:

0
//if I use BoxSizer instead of StaticBoxSizer, the button is clickable.
//if there is a radio button under StaticBoxSizer, it is clickable,
//but the button is not
row1 = wx.StaticBoxSizer(wx.StaticBox(panel, -1, 'this is row one'), orient=wx.HORIZONTAL)
row1.Add(label1,0,wx.TOP | wx.RIGHT,7)
row1.Add(self.fileCtrl)
row2 = wx.BoxSizer(wx.HORIZONTAL)

//for everything in row2, neither buttons nor radio buttons are clickable
actionBox = wx.StaticBoxSizer(wx.StaticBox(panel, -1, 'asdfasdf'), orient=wx.VERTICAL)

actionRow1 = wx.BoxSizer(wx.HORIZONTAL)
actionRow1.Add(wx.StaticText(panel, -1, 'blah blah ', (5, 5)))
actionRow1.Add(self.mailRadio)
actionRow2 = wx.BoxSizer(wx.HORIZONTAL)
actionRow2.Add(wx.StaticText(panel, -1, 'lah dee dah', (5, 5)))
actionRow2.Add(self.uploadRadio,5)
actionBox.Add(actionRow1,0,wx.EXPAND)
actionBox.Add(actionRow2)
row2.Add(actionBox)

wrapper = wx.FlexGridSizer(2,1,5,5)
wrapper.AddGrowableCol(0)
wrapper.Add(row1,0,wx.TOP | wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER,15)
wrapper.Add(row2,0,wx.ALL | wx.ALIGN_CENTER,15)
panel.SetSizerAndFit(wrapper)
self.Centre()
self.Fit()

I'm testing this in OS X, but I need it to work on windows too. Pretty new to this so this is confusing me. Is there something like css z-index that I have to set?