Setting client area size/scrollbars in wxScrolledWindow
Vadim Zeitlin
vadim at wxwidgets.org
Thu Nov 1 17:18:16 PDT 2007
On Thu, 1 Nov 2007 21:12:36 +0000 Richard Danter <radanter at googlemail.com> wrote:
RD> I guess there are two things I need to do:
RD>
RD> 1. increase the width requested by DoGetBestSize() by enough to
RD> include the space required by the vertical scrollbar.
RD> 2. Force the vertical scrollbar to always be visible without also
RD> having the horizontal scrollbar visible.
RD>
RD> Any suggestions how to do this?
Unfortunately (2) is not currently possible (just as with your other
questions, there is a pending patch which does make it possible but it's
for 2.9 only). So right now you should fiddle with the return value of your
DoGetBestSize() to add wxSystemSettings::GetMetric(wxSYS_VSCROLL_X) to
leave enough space for the automatically shown scrollbar if necessary. This
is rather ugly and I'd really like to allow people implementing just some
DoGetBestClientSize() and dealing with the scrollbars automatically but
we still haven't had time to do it...
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list