************ wx.SashEvent ************ Inheritance diagram for `wx.SashEvent`: | .. inheritance-diagram:: wx.SashEvent | Description =========== A sash event is sent when the sash of a `wx.SashWindow <../Widgets/wx.SashWindow.html>`_ has been dragged by the user. .. seealso:: `wx.SashWindow <../Widgets/wx.SashWindow.html>`_ Derived From ^^^^^^^^^^^^^ * `wx.CommandEvent `_ * `wx.Event `_ * `wx.Object <../Widgets/wx.Object.html>`_ Remarks ^^^^^^^ 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:: Note that the `wx.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 `GetDragRect <#GetDragRect>`_ to see what the new size of the window would be if the resize were to be applied. It should also call `GetDragStatus <#GetDragStatus>`_ to see whether the drag was OK or out of the current allowed range. Event Handling ^^^^^^^^^^^^^^ ================================================== ================================================== Event Name Description ================================================== ================================================== wx.EVT_SASH_DRAGGED(id, func) Process a ``wx.wxEVT_SASH_DRAGGED`` event, when the user has finished dragging a sash. wx.EVT_SASH_DRAGGED_RANGE(id1, id2, func) Process a ``wx.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. ================================================== ================================================== Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `GetDragRect <#GetDragRect>`_ * `GetDragStatus <#GetDragStatus>`_ * `GetEdge <#GetEdge>`_ * `SetDragRect <#SetDragRect>`_ * `SetDragStatus <#SetDragStatus>`_ * `SetEdge <#SetEdge>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `DragRect <#DragRect>`_ * `DragStatus <#DragStatus>`_ * `Edge <#Edge>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(id=0, edge=wx.SASH_NONE) Constructor. **Parameters:** * `id` (int) * `edge` (int) | **Returns:** `wx.SashEvent `_ -------- .. method:: GetDragRect() 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. | **Returns:** `wx.Rect <../Widgets/wx.Rect.html>`_ -------- .. method:: GetDragStatus() Returns the status of the sash: one of ``wx.SASH_STATUS_OK``, ``wx.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 range. | **Returns:** `int` -------- .. method:: GetEdge() Returns the dragged edge. The return value is one of ``wx.SASH_TOP``, ``wx.SASH_RIGHT``, ``wx.SASH_BOTTOM``, ``wx.SASH_LEFT``. | **Returns:** `int` -------- .. method:: SetDragRect(rect) | **Parameters:** * `rect` (`wx.Rect <../Widgets/wx.Rect.html>`_) -------- .. method:: SetDragStatus(status) | **Parameters:** * `status` (int) -------- .. method:: SetEdge(edge) | **Parameters:** * `edge` (int) -------- Properties ^^^^^^^^^^ .. attribute:: DragRect See `GetDragRect <#GetDragRect>`_ and `SetDragRect <#SetDragRect>`_ .. attribute:: DragStatus See `GetDragStatus <#GetDragStatus>`_ and `SetDragStatus <#SetDragStatus>`_ .. attribute:: Edge See `GetEdge <#GetEdge>`_ and `SetEdge <#SetEdge>`_