Package wx :: Package lib :: Module scrolledpanel :: Class ScrolledPanel
[frames | no frames]

Type ScrolledPanel

object --+                        
         |                        
    Object --+                    
             |                    
    EvtHandler --+                
                 |                
            Window --+            
                     |            
                 Panel --+        
                         |        
            ScrolledWindow --+    
                             |    
              PyScrolledWindow --+
                                 |
                                ScrolledPanel


ScrolledPanel fills a "hole" in the implementation of wx.ScrolledWindow, providing automatic scrollbar and scrolling behavior and the tab traversal management that wxScrolledWindow lacks. This code was based on the original demo code showing how to do this, but is now available for general use as a proper class (and the demo is now converted to just use it.)

It is assumed that the ScrolledPanel will have a sizer, as it is used to calculate the minimal virtual size of the panel and etc.


Method Summary
  __init__(self, parent, id, pos, size, style, name)
  OnChildFocus(self, evt)
  ScrollChildIntoView(self, child)
Scrolls the panel such that the specified child window is in view.
  SetupScrolling(self, scroll_x, scroll_y, rate_x, rate_y, scrollToTop)
This function sets up the event handling necessary to handle scrolling properly.

Property Summary

Instance Method Details

ScrollChildIntoView(self, child)

Scrolls the panel such that the specified child window is in view.

SetupScrolling(self, scroll_x=True, scroll_y=True, rate_x=20, rate_y=20, scrollToTop=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.


Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:55:20 2009 http://epydoc.sf.net