Hi All,
Here is the code of a frame:
import wx
class PanelDatabaseDe finition(wx.Pan el):
def __init__(self,p arent):
wx.Panel.__init __(self,parent)
self.sizer = wx.BoxSizer(wx. VERTICAL)
self.SetSizer(s elf.sizer)
self.sizer.Add( wx.Button(self, label="test1"), flag=wx.EXPAND, proportion=1)
self.sizer.Add( wx.Button(self, label="test2"), flag=wx.EXPAND, proportion=1)
class FrameDatabaseDe finition(wx.Fra me):
def __init__(self,p arent,title):
wx.Frame.__init __(self,parent, title=title)
self.panel = PanelDatabaseDe finition(self)
self.sizer = wx.BoxSizer(wx. VERTICAL)
self.SetSizer(s elf.sizer)
self.sizer.Add( self.panel,flag =wx.EXPAND,prop ortion=1)
self.Layout()
I would like to use the panel PanelDatabaseDe finition on the frame
FrameDatabaseDe finition, but I should also be able to use the panel on
other frames. (A la "Delphi frames".) My problem is that only one of the
buttons is visible and that one is not expanded. (System: Windows,
Python 2.3.4, wxPython 2.5.3)
Best,
Laci