When can you trust a window size?
Volker Bartheld
dr_versaeg at freenet.de
Thu Sep 21 09:13:24 PDT 2006
Hi!
I wonder at what point of time in the life of a wxWindow,
wxScrolledWindow or wxPanel the "default" values for width and height
(in case of wxScrolledWindow also the virtual values) reflect the
reality.
Normally, when constructing a minimal class MyWindow:public wxWindow;
via MyWindow* pTheWin=MyWindow(this, wxID_ANY);
and asking GetSize() in the MyWindow()-c'tor - after setting some
sizers, adding controls and finally calling Fit() - I'd expect to get
the real values instead of wxSize(20, 20) or even wxSize(-1, -1).
But on some platforms, this seems not to be the case.
What do I have to do to be sure that GetSize()'s return value matches
the actual screen size? I think, this recipe would also hold true for
wxScrolledWindow::GetVirtualSize, right?
Do I probably have to wait for the first wxPaintEvent or is there some
other trick I've missed?
THX,
Volker,
currently using wxW 2.6.3
__
Mail replies to/an V B A R T H E L D at G M X dot D E
More information about the wx-users
mailing list