How to make scrollbars appear in a wx.lib.scrolledpanel.ScrolledPanel which has no widgets but only a straight line?

32 views
Skip to first unread message

steve

unread,
Jul 17, 2016, 3:33:22 PM7/17/16
to wxPython-users
Hi,

I create a wx.lib.scrolledpanel.ScrolledPanel  with this size: width=500, height=500.
I insert it in its parent panel inside a vertical box sizer.
Then,  in ScrolledPanel, I draw a vertical line with a height of 1000.
When I run the app, scrollbars are not displayed on ScrolledPanel. I just see my vertical line with a height of 500, because height of parent panel is 500.

Why doesn't the vertical scrollbar appear, so that I can scroll down and see the rest of that vertical line? How do I make it appear?

I even try to set the height of ScrolledPanel to 1000 after I draw the vertical line, but it doesn't work either, something like:

create_parent_panel()
create_scrolled_panel()
put_scrolled_pane_on_parent_panel_and_set_size()
draw_the_vertical_line()
set_scrolled_panels_height_to_1000()
update_and_refresh_scrolled_panel()

but it doesn't work.

Robin Dunn

unread,
Jul 27, 2016, 10:41:27 PM7/27/16
to wxpytho...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages