[2.8.0] wxTreebook bug
H
H at h.com
Sat Mar 24 04:32:15 PDT 2007
I while ago I have reported a wxTreebook bug that can be seen in the
notebook sample when switching initially from the standard notebook to a
treebook: the control window and the page window overlap.
I have now tracked down the cause of the problem - I tracked it down
only for the generic implementation - and would like to ask you if the
following solution is acceptable (then, I will submit the patch):
The generic treebook implementation uses the generic tree control. When
initializing the generic tree control 'DoGetBestSize()' is called to
determine initially the best size. This function returns for default
sizes the values (12, 12) - at least on the Mac. But this calculation is
NOT taking into consideration that also sliders are initially present.
On the Mac - and I think also on other platforms - this means that the
control's client size becomes negative. And this messes everything up.
So, the easiest solution is to modify wxGenericTreeCtrl::DoGetBestSize
to take sliders into account when they are present. Does this cause any
problems anywhere (please keep in mind that when the sliders are removed
later the best size is still the size with the sliders as the original
size is saved)?
If wxGenericTreeCtrl::DoGetBestSize cannot be patched like mentioned
above wxTreebook itself has to be patched.
Hartwig
More information about the wx-users
mailing list