Package nltk_lite :: Package draw :: Class ScrollWatcherWidget
[show private | hide private]
[frames | no frames]

Type ScrollWatcherWidget

  object --+    
           |    
CanvasWidget --+
               |
              ScrollWatcherWidget


A special canvas widget that adjusts its Canvas's scrollregion to always include the bounding boxes of all of its children. The scroll-watcher widget will only increase the size of the Canvas's scrollregion; it will never decrease it.
Method Summary
  __init__(self, canvas, *children, **attribs)
Create a new scroll-watcher widget.
None add_child(self, canvaswidget)
Add a new canvas widget to the scroll-watcher.
None remove_child(self, canvaswidget)
Remove a canvas widget from the scroll-watcher.
Inherited from CanvasWidget: __getitem__, __repr__, __setitem__, bbox, bind_click, bind_drag, canvas, child_widgets, destroy, height, hidden, hide, manage, move, moveto, parent, show, tags, unbind_click, unbind_drag, update, width
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Method Details

__init__(self, canvas, *children, **attribs)
(Constructor)

Create a new scroll-watcher widget.
Parameters:
canvas - This canvas widget's canvas.
           (type=Tkinter.Canvas)
children - The canvas widgets watched by the scroll-watcher. The scroll-watcher will ensure that these canvas widgets are always contained in their canvas's scrollregion.
           (type=list of CanvasWidget)
attribs - The new canvas widget's attributes.
Overrides:
nltk_lite.draw.CanvasWidget.__init__

add_child(self, canvaswidget)

Add a new canvas widget to the scroll-watcher. The scroll-watcher will ensure that the new canvas widget is always contained in its canvas's scrollregion.
Parameters:
canvaswidget - The new canvas widget.
           (type=CanvasWidget)
Returns:
None

remove_child(self, canvaswidget)

Remove a canvas widget from the scroll-watcher. The scroll-watcher will no longer ensure that the new canvas widget is always contained in its canvas's scrollregion.
Parameters:
canvaswidget - The canvas widget to remove.
           (type=CanvasWidget)
Returns:
None

Generated by Epydoc 2.1 on Tue Sep 5 09:37:22 2006 http://epydoc.sf.net