L
Laszlo Zsolt Nagy
Hi All,
Here is the code of a frame:
import wx
class PanelDatabaseDefinition(wx.Panel):
def __init__(self,parent):
wx.Panel.__init__(self,parent)
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(self.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 FrameDatabaseDefinition(wx.Frame):
def __init__(self,parent,title):
wx.Frame.__init__(self,parent,title=title)
self.panel = PanelDatabaseDefinition(self)
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(self.sizer)
self.sizer.Add(self.panel,flag=wx.EXPAND,proportion=1)
self.Layout()
I would like to use the panel PanelDatabaseDefinition on the frame
FrameDatabaseDefinition, 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
Here is the code of a frame:
import wx
class PanelDatabaseDefinition(wx.Panel):
def __init__(self,parent):
wx.Panel.__init__(self,parent)
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(self.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 FrameDatabaseDefinition(wx.Frame):
def __init__(self,parent,title):
wx.Frame.__init__(self,parent,title=title)
self.panel = PanelDatabaseDefinition(self)
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(self.sizer)
self.sizer.Add(self.panel,flag=wx.EXPAND,proportion=1)
self.Layout()
I would like to use the panel PanelDatabaseDefinition on the frame
FrameDatabaseDefinition, 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