__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.
-
|