I have a gui with 3 basic areas. A list control that spans the entire width of the window above two areas of buttons that are grouped based on function of the button.
When the window is resized all 3 areas are resized in proportion to the growth of the window. What I want to happen is the two button areas to not do any height growth, but would allow width growth.
Is this possible?
Here is what I am using as an example. I generated this using wxGlade
#!/usr/bin/env python
# -*- coding: iso-8859-15 -*-
# generated by wxGlade 0.6.3 on Thu Apr 14 07:05:59 2011
import wx
# begin wxGlade: extracode
# end wxGlade
class mainFrame(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: mainFrame.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.panelLower = wx.Panel(self, -1)
self.panelUpper = wx.Panel(self, -1)
self.sizerPassword_staticbox = wx.StaticBox(self.panelLower, -1, "Password Settings")
self.sizerInstall_staticbox = wx.StaticBox(self.panelLower, -1, "Install Actions")
self.sizerStatus_staticbox = wx.StaticBox(self.panelUpper, -1, "Status")
self.listStatus = wx.ListCtrl(self.panelUpper, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER)
self.list_ctrl_1 = wx.ListCtrl(self.panelLower, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER)
self.__set_properties()
self.__do_layout()
# end wxGlade
def __set_properties(self):
# begin wxGlade: mainFrame.__set_properties
self.SetTitle("frame_1")
# end wxGlade
def __do_layout(self):
# begin wxGlade: mainFrame.__do_layout
mainSizer = wx.GridSizer(2, 1, 0, 0)
sizerLower = wx.GridSizer(1, 2, 0, 0)
sizerInstall = wx.StaticBoxSizer(self.sizerInstall_staticbox, wx.HORIZONTAL)
sizerInstallButtons = wx.GridSizer(1, 2, 0, 0)
sizer_4 = wx.BoxSizer(wx.VERTICAL)
sizerPassword = wx.StaticBoxSizer(self.sizerPassword_staticbox, wx.HORIZONTAL)
sizerPasswordButtons = wx.GridSizer(3, 8, 0, 0)
sizerStatus = wx.StaticBoxSizer(self.sizerStatus_staticbox, wx.VERTICAL)
sizerStatus.Add(self.listStatus, 1, wx.EXPAND, 0)
self.panelUpper.SetSizer(sizerStatus)
mainSizer.Add(self.panelUpper, 1, wx.EXPAND, 0)
sizerPassword.Add(sizerPasswordButtons, 1, wx.EXPAND, 0)
sizerLower.Add(sizerPassword, 1, wx.EXPAND, 0)
sizerInstallButtons.Add(self.list_ctrl_1, 1, wx.EXPAND, 0)
sizerInstallButtons.Add(sizer_4, 1, wx.EXPAND, 0)
sizerInstall.Add(sizerInstallButtons, 1, wx.EXPAND, 0)
sizerLower.Add(sizerInstall, 1, wx.EXPAND, 0)
self.panelLower.SetSizer(sizerLower)
mainSizer.Add(self.panelLower, 1, wx.EXPAND, 0)
self.SetSizer(mainSizer)
mainSizer.Fit(self)
self.Layout()
# end wxGlade
# end of class mainFrame
if __name__ == "__main__":
app = wx.PySimpleApp(0)
wx.InitAllImageHandlers()
mainFrame = mainFrame(None, -1, "")
app.SetTopWindow(mainFrame)
mainFrame.Show()
app.MainLoop()
1 Answer