.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2025 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.floatcanvas.Utilities.GUI

.. highlight:: python



.. _wx.lib.floatcanvas.Utilities.GUI.RubberBandBox:

==========================================================================================================================================
|phoenix_title|  **wx.lib.floatcanvas.Utilities.GUI.RubberBandBox**
==========================================================================================================================================

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



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div class="collabsible-wrapper">
      <input id="collapsible-inheritance" class="collapsible-checkbox" type="checkbox">
      <label for="collapsible-inheritance" tabindex="0" title="Show inheritance diagram" class="collapsible-label">Inheritance diagram for class <strong>RubberBandBox</strong>:</label>
      <div class="collapsible-content">
         <p class="graphviz">
            <center><img src="_static/images/inheritance/wx.lib.floatcanvas.Utilities.GUI.RubberBandBox_inheritance.svg" alt="Inheritance diagram of RubberBandBox" usemap="#dummy" class="inheritance invert-in-dark-mode"/></center>
            <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.floatcanvas.Utilities.GUI.RubberBandBox.html" title="Class to provide a GUI Mode that makes a rubber band box that can be drawn on a Window" alt="" coords="5,82,372,111"/> <area shape="rect" id="node2" href="wx.lib.floatcanvas.GUIMode.GUIBase.html" title="Basic Mouse mode and baseclass for other GUImode." alt="" coords="41,5,337,34"/> </map> 
         </p>
      </div>
   </div>
   <script type="text/javascript" src="_static/inheritancetoggle.js"></script>



|


|super_classes| Known Superclasses
==================================

:class:`wx.lib.floatcanvas.GUIMode.GUIBase`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.floatcanvas.Utilities.GUI.RubberBandBox.__init__`                 Default class constructor.
:meth:`~wx.lib.floatcanvas.Utilities.GUI.RubberBandBox.OnLeftDown`               
:meth:`~wx.lib.floatcanvas.Utilities.GUI.RubberBandBox.OnLeftUp`                 
:meth:`~wx.lib.floatcanvas.Utilities.GUI.RubberBandBox.OnMove`                   
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: RubberBandBox(GUIMode.GUIBase)

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

   .. method:: __init__(self, CallBack, Tol=5)

      Default class constructor.
      
      :param `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.
      :param `Tol`: The tolerance for the smallest rectangle allowed. defaults
                to 5. In pixels


   .. method:: OnLeftDown(self, event)


   .. method:: OnLeftUp(self, event)


   .. method:: OnMove(self, event)


