.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. _wx.adv.SashEvent: ========================================================================================================================================== |phoenix_title| **wx.adv.SashEvent** ========================================================================================================================================== A sash event is sent when the sash of a :ref:`wx.adv.SashWindow` has been dragged by the user. .. _SashEvent-events: |events| Events Emitted by this Class ===================================== Handlers bound for the following event types will receive a :ref:`wx.adv.SashEvent` parameter. - EVT_SASH_DRAGGED: Process a ``wxEVT_SASH_DRAGGED`` event, when the user has finished dragging a sash. - EVT_SASH_DRAGGED_RANGE: Process a ``wxEVT_SASH_DRAGGED_RANGE`` event, when the user has finished dragging a sash. The event handler is called when windows with ids in the given range have their sashes dragged. .. note:: When a sash belonging to a sash window is dragged by the user, and then released, this event is sent to the window, where it may be processed by an event table entry in a derived class, a plug-in event handler or an ancestor class. Note that the :ref:`wx.adv.SashWindow` doesn't change the window's size itself. It relies on the application's event handler to do that. This is because the application may have to handle other consequences of the resize, or it may wish to veto it altogether. The event handler should look at the drag rectangle: see :meth:`wx.adv.SashEvent.GetDragRect` to see what the new size of the window would be if the resize were to be applied. It should also call :meth:`wx.adv.SashEvent.GetDragStatus` to see whether the drag was ``wx.OK`` or out of the current allowed range. .. seealso:: :ref:`wx.adv.SashWindow`, :ref:`Events and Event Handling <events and event handling>` | |class_hierarchy| Class Hierarchy ================================= .. raw:: html <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;"> <img id="toggleBlock-trigger" src="_static/images/closed.png"/> Inheritance diagram for class <strong>SashEvent</strong>: </div> <div id="toggleBlock-summary" style="display:block;"></div> <div id="toggleBlock-content" style="display:none;"> <p class="graphviz"> <center><img src="_static/images/inheritance/wx.adv.SashEvent_inheritance.svg" alt="Inheritance diagram of SashEvent" usemap="#dummy" class="inheritance"/></center> <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script> <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.adv.SashEvent.html" title="A sash event is sent when the sash of a wx.adv.SashWindow has been dragged by the user." alt="" coords="9,236,169,265"/> <area shape="rect" id="node2" href="wx.CommandEvent.html" title="This event class contains information about command events, which originate from a variety of simple controls." alt="" coords="5,159,173,188"/> <area shape="rect" id="node3" href="wx.Event.html" title="An event is a structure holding information about an event passed to a callback or member function." alt="" coords="42,82,136,111"/> <area shape="rect" id="node4" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="40,5,139,34"/> </map> </p> </div> | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.adv.SashEvent.__init__` Constructor. :meth:`~wx.adv.SashEvent.GetDragRect` Returns the rectangle representing the new size the window would be if the resize was applied. :meth:`~wx.adv.SashEvent.GetDragStatus` Returns the status of the sash: one of ``wx.adv.SASH_STATUS_OK``, ``wx.adv.SASH_STATUS_OUT_OF_RANGE``. :meth:`~wx.adv.SashEvent.GetEdge` Returns the dragged edge. :meth:`~wx.adv.SashEvent.SetDragRect` :meth:`~wx.adv.SashEvent.SetDragStatus` :meth:`~wx.adv.SashEvent.SetEdge` ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~wx.adv.SashEvent.DragRect` See :meth:`~wx.adv.SashEvent.GetDragRect` and :meth:`~wx.adv.SashEvent.SetDragRect` :attr:`~wx.adv.SashEvent.DragStatus` See :meth:`~wx.adv.SashEvent.GetDragStatus` and :meth:`~wx.adv.SashEvent.SetDragStatus` :attr:`~wx.adv.SashEvent.Edge` See :meth:`~wx.adv.SashEvent.GetEdge` and :meth:`~wx.adv.SashEvent.SetEdge` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.adv.SashEvent(CommandEvent) **Possible constructors**:: SashEvent(id: int=0, edge: SashEdgePosition=SASH_NONE) -> None A sash event is sent when the sash of a SashWindow has been dragged by the user. .. method:: __init__(self, id: int=0, edge: SashEdgePosition=SASH_NONE) Constructor. :param `id`: :type `id`: int :param `edge`: :type `edge`: wx.adv.SashEdgePosition :rtype: `None` .. method:: GetDragRect(self) Returns the rectangle representing the new size the window would be if the resize was applied. It is up to the application to set the window size if required. :rtype: `Rect` .. method:: GetDragStatus(self) Returns the status of the sash: one of ``wx.adv.SASH_STATUS_OK``, ``wx.adv.SASH_STATUS_OUT_OF_RANGE``. If the drag caused the notional bounding box of the window to flip over, for example, the drag will be out of rage. :rtype: :ref:`wx.adv.SashDragStatus` .. method:: GetEdge(self) Returns the dragged edge. The return value is one of ``wx.adv.SASH_TOP``, ``wx.adv.SASH_RIGHT``, ``wx.adv.SASH_BOTTOM``, ``wx.adv.SASH_LEFT``. :rtype: :ref:`wx.adv.SashEdgePosition` .. method:: SetDragRect(self, rect : Rect) :param `rect`: :type `rect`: wx.Rect :rtype: `None` .. method:: SetDragStatus(self, status : SashDragStatus) :param `status`: :type `status`: wx.adv.SashDragStatus :rtype: `None` .. method:: SetEdge(self, edge : SashEdgePosition) :param `edge`: :type `edge`: wx.adv.SashEdgePosition :rtype: `None` .. attribute:: DragRect See :meth:`~wx.adv.SashEvent.GetDragRect` and :meth:`~wx.adv.SashEvent.SetDragRect` .. attribute:: DragStatus See :meth:`~wx.adv.SashEvent.GetDragStatus` and :meth:`~wx.adv.SashEvent.SetDragStatus` .. attribute:: Edge See :meth:`~wx.adv.SashEvent.GetEdge` and :meth:`~wx.adv.SashEvent.SetEdge`