I understand that a wxFrame with one child should automatically size that
child to fill it's client area. But I find I always have to do something
like
panel.SetSize(frame.GetCLientSize())
otherwise I get a 20x20 panel.
Perhaps some kind soul could tell me why my wxPanal is not automatically
getting sized to the client area in my wxFrame? (System=Linux Mandrake 7.0
wxPython 2.2.5)
#!/usr/bin/env python
from wxPython.wx import *
class MyFrame(wxFrame):
def __init__(self, parent, id, title):
wxFrame.__init__(self, parent, id, title,wxPoint(100, 100),
wxSize(600, 500))
# panel=wxPanel(self,-1,size=self.GetClientSize()) <-Why do I need to
do this?
panel = wxPanel(self, -1)
print self.GetClientSize()
print panel.GetSize()
self.tree=wxTreeCtrl(panel,-1)
# self.tree.SetSize(panel.GetClientSize()) <-Same here?
self.root=self.tree.AddRoot("No database")
# self.tree.SetPyData(self.root,None)
class MyApp(wxApp):
def OnInit(self):
frame = MyFrame(NULL, -1, "Cell Designer")
frame.Show(true)
self.SetTopWindow(frame)
return true
app= MyApp(0)
app.MainLoop()
Thanks
Jan
···
_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users