Package xdp :: Module tkutil :: Class ScrolledMixin
[show private | hide private]
[frames | no frames]

Class ScrolledMixin

FrameLayoutMixin --+
                   |
                  ScrolledMixin

Known Subclasses:
ScrolledCanvas, ScrolledList, ScrolledText

This mixin can be used with widgets which support Tk's scrolling API (xscollcommand, xview, etc) to create a compound widget with scrollbars which automagically appear and disappear. See the 'ScrolledText' class for a simple example, or the 'ScrolledCanvas' class for an example of how to accomplish the same thing when the child widget doesn't correctly update its scrollregion.
Method Summary
  __init__(self, frame)
Creates the container frame and scrollbars and attaches them to the widget.
  __scrollX(self, min, max)
Private method used as the callback for the widget's xscrollcommand.
  __scrollY(self, min, max)
Private method used as the callback for the widget's yscrollcommand.
  __updateScroll(self)
Private method which draws or hides the scollbars as necessary, resizing the scrolled widget to fill as much of the frame as possible.

Method Details

__init__(self, frame)
(Constructor)

Creates the container frame and scrollbars and attaches them to the widget. This constructor should be invoked last, after the container frame has been created and the widget's main constructor have been invoked.
Overrides:
xdp.tkutil.FrameLayoutMixin.__init__

__scrollX(self, min, max)

Private method used as the callback for the widget's xscrollcommand.

__scrollY(self, min, max)

Private method used as the callback for the widget's yscrollcommand.

__updateScroll(self)

Private method which draws or hides the scollbars as necessary, resizing the scrolled widget to fill as much of the frame as possible.

Generated by Epydoc 2.1 on Wed Jul 20 11:51:06 2005 http://epydoc.sf.net