Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > wx.BoxSizer problem

Reply
Thread Tools

wx.BoxSizer problem

 
 
Laszlo Zsolt Nagy
Guest
Posts: n/a
 
      01-21-2005

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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem problem problem :( Need Help Mike ASP General 2 05-11-2004 08:36 AM



Advertisments