.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. currentmodule:: wx.lib.scrolledpanel .. highlight:: python .. _wx.lib.scrolledpanel.ScrolledPanel: ========================================================================================================================================== |phoenix_title| **wx.lib.scrolledpanel.ScrolledPanel** ========================================================================================================================================== :class:`ScrolledPanel` fills a "hole" in the implementation of :class:`ScrolledWindow`, providing automatic scrollbar and scrolling behavior and the tab traversal management that :class:`ScrolledWindow` lacks. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class ScrolledPanel:
| |super_classes| Known Superclasses ================================== :class:`wx.ScrolledWindow` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.lib.scrolledpanel.ScrolledPanel.__init__` Default class constructor. :meth:`~wx.lib.scrolledpanel.ScrolledPanel.OnChildFocus` If the child window that gets the focus is not fully visible, :meth:`~wx.lib.scrolledpanel.ScrolledPanel.ScrollChildIntoView` Scroll the panel so that the specified child window is in view. :meth:`~wx.lib.scrolledpanel.ScrolledPanel.SetupScrolling` This function sets up the event handling necessary to handle ================================================================================ ================================================================================ | |api| Class API =============== .. class:: ScrolledPanel(wx.ScrolledWindow) :class:`ScrolledPanel` fills a "hole" in the implementation of :class:`ScrolledWindow`, providing automatic scrollbar and scrolling behavior and the tab traversal management that :class:`ScrolledWindow` lacks. .. method:: __init__(self, parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.TAB_TRAVERSAL, name="scrolledpanel") Default class constructor. :param wx.Window `parent`: parent window. Must not be ``None``; :param integer `id`: window identifier. A value of -1 indicates a default value; :param `pos`: the control position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxPython, depending on platform; :type `pos`: tuple or :class:`wx.Point` :param `size`: the control size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxPython, depending on platform; :type `size`: tuple or :class:`wx.Size` :param integer `style`: the underlying :class:`wx.ScrolledWindow` style; :param string `name`: the scrolled panel name. .. method:: 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. :param `evt`: a :class:`ChildFocusEvent` event to be processed. .. method:: ScrollChildIntoView(self, child) Scroll the panel so that the specified child window is in view. :param wx.Window `child`: any :class:`wx.Window` - derived control. .. note:: This method looks redundant if `evt.Skip()` is called as well - the base :class:`ScrolledWindow` widget now seems to be doing the same thing anyway. .. method:: 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 :class:`ScrolledPanel`, once the controls on the panel have been constructed and thus the size of the scrolling area can be determined. :param bool `scroll_x`: ``True`` to allow horizontal scrolling, ``False`` otherwise; :param bool `scroll_y`: ``True`` to allow vertical scrolling, ``False`` otherwise; :param int `rate_x`: the horizontal scroll increment; :param int `rate_y`: the vertical scroll increment; :param bool `scrollToTop`: ``True`` to scroll all way to the top, ``False`` otherwise; :param bool `scrollIntoView`: ``True`` to scroll a focused child into view, ``False`` otherwise.