Package wx :: Package lib :: Package floatcanvas :: Package Utilities :: Module GUI :: Class RubberBandBox

[frames | no frames]

## Class RubberBandBox

Class to provide a rubber band box that can be drawn on a Window

Method Summary
| ``__init__`(self, Canvas, CallBack, Tol)` To initialize:
| ``Disable`(self)` Called when you don't want the rubber band box to be enabled
| ``Enable`(self)` Called when you want the rubber band box to be enabled
| `OnLeftDown(self, event)`
| `OnLeftUp(self, event)`
| `OnMove(self, event)`

Method Details

### __init__(self, Canvas, CallBack, Tol=5)
(Constructor)

To initialize:

RubberBandBox(Canvas, CallBack)

Canvas: the FloatCanvas you want the Rubber band box to be used on

CallBack: is the method you want called when the mouse is
  released. That method will be called, passing in a rect parameter, where rect is: (Point, WH) of the rect in world coords.
Tol: The tolerance for the smallest rectangle allowed. defaults
  to 5. In pixels

Methods:

Enable() : Enables the Rubber Band Box (Binds the events)

Disable() : Enables the Rubber Band Box (Unbinds the events)

Attributes:

CallBack: The callback function, if it's replaced you need to
  call Enable() again.

### Disable(self)

Called when you don't want the rubber band box to be enabled

### Enable(self)

Called when you want the rubber band box to be enabled

Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:54:44 2009 | http://epydoc.sf.net