ScrolledPanel
fills a “hole” in the implementation of
ScrolledWindow
, providing automatic scrollbar and scrolling
behavior and the tab traversal management that ScrolledWindow
lacks.
__init__ |
Default class constructor. |
OnChildFocus |
If the child window that gets the focus is not fully visible, |
ScrollChildIntoView |
Scroll the panel so that the specified child window is in view. |
SetupScrolling |
This function sets up the event handling necessary to handle |
ScrolledPanel
(wx.ScrolledWindow)¶ScrolledPanel
fills a “hole” in the implementation of
ScrolledWindow
, providing automatic scrollbar and scrolling
behavior and the tab traversal management that ScrolledWindow
lacks.
__init__
(self, parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.TAB_TRAVERSAL, name="scrolledpanel")¶Default class constructor.
Parameters: |
|
---|
OnChildFocus
(self, evt)¶If the child window that gets the focus is not fully visible, this handler will try to scroll enough to see it.
Parameters: | evt – a ChildFocusEvent event to be processed. |
---|
ScrollChildIntoView
(self, child)¶Scroll the panel so that the specified child window is in view.
Parameters: | child (wx.Window) – any wx.Window - derived control. |
---|
Note
This method looks redundant if evt.Skip() is
called as well - the base ScrolledWindow
widget now seems
to be doing the same thing anyway.
SetupScrolling
(self, scroll_x=True, scroll_y=True, rate_x=20, rate_y=20, scrollToTop=True, scrollIntoView=True)¶This function sets up the event handling necessary to handle
scrolling properly. It should be called within the __init__
function of any class that is derived from ScrolledPanel
,
once the controls on the panel have been constructed and
thus the size of the scrolling area can be determined.
Parameters: |
|
---|