Check out, wxWindow::SetSizeHints
jw
···
-----Original Message-----
From: Chuck Esterbrook [mailto:ChuckEsterbrook@yahoo.com]
Sent: Thursday, March 13, 2003 6:55 PM
To: wxPython-users@lists.wxwindows.org
Subject: [wxPython-users] GetFooSize() methodsSo in trying to get my scrolling view working, I'm digging
through the
docs and seeing methods like GetAdjustedBestSize() and
GetVirtualSize(). They never get called in my application whether
during startup or when resizing windows.They don't get called in the following program either.
What are these methods really for and who invokes them?
Or maybe my real question is: what method can I override in a
subclass
of window to tell inquiring sizers the minimum size of that window?from wxPython.wx import *
class MyPanel(wxPyPanel):
def __init__(self, *posArgs, **kwArgs):
wxPyPanel.__init__(self, *posArgs, **kwArgs)
wxStaticText(self, -1, "Hello, world")def GetAdjustedBestSize(self):
print 1
assert 0def GetBestSize(self):
print 2
assert 0def GetVirtualSize(self):
print 3
assert 0app = wxPySimpleApp()
frame = wxFrame(None, -1, "")
p = MyPanel(frame, -1)
sizer = wxBoxSizer(wxVERTICAL)
sizer.Add(p, 1, wxEXPAND|wxALL)
frame.Show(1)
app.MainLoop()--
Chuck
http://ChuckEsterbrook.com---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwindows.org