ScrolledWindow question

Hi,

    I have a ScrolledWindow. But I programmatically add some controls
to it. But it doesn't show a scrollbar until I resize the frame. I
couldn't find a way to show scrollbars. Maybe it can be done by firing
size event. But do you know any easy way of doing this ? (on windows
2.8.0.1)

I believe calling window.Layout() should handle it properly.

- Josiah

···

"Murat Erten" <murerten@gmail.com> wrote:

    I have a ScrolledWindow. But I programmatically add some controls
to it. But it doesn't show a scrollbar until I resize the frame. I
couldn't find a way to show scrollbars. Maybe it can be done by firing
size event. But do you know any easy way of doing this ? (on windows
2.8.0.1)

Murat Erten wrote:

Hi,

   I have a ScrolledWindow. But I programmatically add some controls
to it. But it doesn't show a scrollbar until I resize the frame. I
couldn't find a way to show scrollbars. Maybe it can be done by firing
size event. But do you know any easy way of doing this ? (on windows
2.8.0.1)

If you're not using a sizer then you need to SetVirtualSize and SetScrollRate. If you are using a sizer then you need to trigger a layout. If calling Layout doesn't do it then try SendSizeEvent.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

It's in a sizer but Layout didn't do anything. But SendSizeEvent made
it work. Thanks to the masters, one more windows issue is solved :slight_smile:

···

2007/1/24, Robin Dunn <robin@alldunn.com>:

Murat Erten wrote:
> Hi,
>
> I have a ScrolledWindow. But I programmatically add some controls
> to it. But it doesn't show a scrollbar until I resize the frame. I
> couldn't find a way to show scrollbars. Maybe it can be done by firing
> size event. But do you know any easy way of doing this ? (on windows
> 2.8.0.1)

If you're not using a sizer then you need to SetVirtualSize and
SetScrollRate. If you are using a sizer then you need to trigger a
layout. If calling Layout doesn't do it then try SendSizeEvent.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org