parameters: (self, scroll_x=True, scroll_y=True, rate_x=20, rate_y=20, 
                         scrollToTop=True, scrollIntoView=True)
docstring: 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.
docstring_summary: 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.
docstring_tokens: 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 .
function: def 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.
  
          """
          self.scrollIntoView = scrollIntoView
  
          # The following is all that is needed to integrate the sizer and the scrolled window
          if not scroll_x: rate_x = 0
          if not scroll_y: rate_y = 0
  
          # Round up the virtual size to be a multiple of the scroll rate
          sizer = self.GetSizer()
          if sizer:
              w, h = sizer.GetMinSize()
              if rate_x:
                  w += rate_x - (w % rate_x)
              if rate_y:
                  h += rate_y - (h % rate_y)
              self.SetVirtualSize( (w, h) )
          self.SetScrollRate(rate_x, rate_y)        
          wx.CallAfter(self._SetupAfter, scrollToTop)
function_tokens: def SetupScrolling ( self , scroll_x = True , scroll_y = True , rate_x = 20 , rate_y = 20 , scrollToTop = True , scrollIntoView = True ) : self . scrollIntoView = scrollIntoView # The following is all that is needed to integrate the sizer and the scrolled window if not scroll_x : rate_x = 0 if not scroll_y : rate_y = 0 # Round up the virtual size to be a multiple of the scroll rate sizer = self . GetSizer ( ) if sizer : w , h = sizer . GetMinSize ( ) if rate_x : w += rate_x - ( w % rate_x ) if rate_y : h += rate_y - ( h % rate_y ) self . SetVirtualSize ( ( w , h ) ) self . SetScrollRate ( rate_x , rate_y ) wx . CallAfter ( self . _SetupAfter , scrollToTop )