By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,172 Members | 727 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,172 IT Pros & Developers. It's quick & easy.

wx.BoxSizer problem

P: n/a

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,proportio n=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
Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.