phoenix_title wx.adv.SashEvent

A sash event is sent when the sash of a wx.adv.SashWindow has been dragged by the user.

^^

events Events Emitted by this Class

Handlers bound for the following event types will receive a 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 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 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 wx.adv.SashEvent.GetDragStatus to see whether the drag was wx.OK or out of the current allowed range.

class_hierarchy Class Hierarchy

Inheritance diagram for class SashEvent:

method_summary Methods Summary

__init__

Constructor.

GetDragRect

Returns the rectangle representing the new size the window would be if the resize was applied.

GetDragStatus

Returns the status of the sash: one of wx.adv.SASH_STATUS_OK, wx.adv.SASH_STATUS_OUT_OF_RANGE.

GetEdge

Returns the dragged edge.

SetDragRect

SetDragStatus

SetEdge


property_summary Properties Summary

DragRect

See GetDragRect and SetDragRect

DragStatus

See GetDragStatus and SetDragStatus

Edge

See GetEdge and 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.


Methods

__init__(self, id=0, edge=SASH_NONE)

Constructor.

Parameters:


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.

Return type:

Rect



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.

Return type:

wx.adv.SashDragStatus



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.

Return type:

wx.adv.SashEdgePosition



SetDragRect(self, rect)
Parameters:

rect (wx.Rect) –



SetDragStatus(self, status)
Parameters:

status (SashDragStatus) –



SetEdge(self, edge)
Parameters:

edge (SashEdgePosition) –


Properties

DragRect

See GetDragRect and SetDragRect



DragStatus

See GetDragStatus and SetDragStatus



Edge

See GetEdge and SetEdge