[wxMac 2.8x] wxWindow::DoGetBestSize bug still not solved
H
H at h.com
Fri Apr 13 09:44:12 PDT 2007
I already posted this a while ago but did not get an answer. Therefore,
my next try.
This is the statement causing problems:
else if ( !GetChildren().empty()
#ifdef __WXMAC__
&& wxHasRealChildren(this)
#endif
)
There is also a remark related to "wxHasRealChildren" that "scrollbars
are explicitely children" on the Mac (whatever it means).
Why is wxWindowBase::DoGetBestSize() returning wxSize(0, 0) if the
window only has scrollbars? I thought it would at least return the size
needed for the scrollbars.
The real problem is that some modules (example: wxTreebook) assume that
a window's client size is zero or larger. But with this implementation
of DoGetBestSize() this is not the case anymore, it becomes negative!
I am willing to provide a patch as long as somebody tells me what I am
allowed to modify in wxWindow. Especially I am interested why
wxHasRealChildren(this) is necessary at all. Baiscally, this method is
the root of all problems in this case. This method is only used in
DoGetBestSize as far as I can see.
Hartwig
More information about the wx-users
mailing list