.. 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 ` | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class SashEvent:
| |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=0, edge=SASH_NONE) A sash event is sent when the sash of a SashWindow has been dragged by the user. .. method:: __init__(self, id=0, edge=SASH_NONE) Constructor. :param `id`: :type `id`: int :param `edge`: :type `edge`: wx.adv.SashEdgePosition .. 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) :param `rect`: :type `rect`: wx.Rect .. method:: SetDragStatus(self, status) :param `status`: :type `status`: wx.adv.SashDragStatus .. method:: SetEdge(self, edge) :param `edge`: :type `edge`: wx.adv.SashEdgePosition .. 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`