wx.adv.SashWindow¶
wx.adv.SashWindow allows any of its edges to have a sash which can be dragged to resize the window.
The actual content window will be created by the application as a child of wx.adv.SashWindow.
The window (or an ancestor) will be notified of a drag via a wx.adv.SashEvent notification.
Window Styles¶
This class supports the following styles:
wx.adv.SW_3D
: Draws a 3D effect sash and border.wx.adv.SW_3DSASH
: Draws a 3D effect sash.wx.adv.SW_3DBORDER
: Draws a 3D effect border.wx.adv.SW_BORDER
: Draws a thin black border.
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.
Class Hierarchy¶
Known Subclasses¶
Methods Summary¶
Default constructor. |
|
Gets the default sash border size. |
|
Get border size. |
|
Gets the addition border size between child and sash window. |
|
Gets the maximum window size in the x direction. |
|
Gets the maximum window size in the y direction. |
|
Gets the minimum window size in the x direction. |
|
Gets the minimum window size in the y direction. |
|
Returns |
|
Tests for x, y over sash. |
|
Sets the default sash border size. |
|
Sets the additional border size between child and sash window. |
|
Sets the maximum window size in the x direction. |
|
Sets the maximum window size in the y direction. |
|
Sets the minimum window size in the x direction. |
|
Sets the minimum window size in the y direction. |
|
Call this function to make a sash visible or invisible on a particular edge. |
|
Resizes subwindows. |
Properties Summary¶
See |
|
See |
|
See |
|
See |
|
See |
Class API¶
- class wx.adv.SashWindow(Window)¶
Possible constructors:
SashWindow() -> None SashWindow(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=CLIP_CHILDREN|SW_3D, name="sashWindow") -> None
SashWindow allows any of its edges to have a sash which can be dragged to resize the window.
Methods¶
- __init__(self, *args, **kw)¶
-
__init__ (self)
Default constructor.
- Return type:
None
__init__ (self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=CLIP_CHILDREN|SW_3D, name=”sashWindow”)
Constructs a sash window, which can be a child of a frame, dialog or any other non-control window.
- Parameters:
parent (wx.Window) – Pointer to a parent window.
id (wx.WindowID) – Window identifier. If -1, will automatically create an identifier.
pos (wx.Point) – Window position. DefaultPosition is (-1, -1) which indicates that SashWindows should generate a default position for the window. If using the wx.adv.SashWindow class directly, supply an actual position.
size (wx.Size) – Window size. DefaultSize is (-1, -1) which indicates that SashWindows should generate a default size for the window.
style (long) – Window style. For window styles, please see wx.adv.SashWindow.
name (string) – Window name.
- Return type:
None
- static GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)¶
- Parameters:
variant (WindowVariant)
- Return type:
VisualAttributes
- GetDefaultBorderSize(self)¶
Gets the default sash border size.
- Return type:
int
- GetEdgeMargin(self, edge)¶
Get border size.
- Parameters:
edge (SashEdgePosition)
- Return type:
int
- GetExtraBorderSize(self)¶
Gets the addition border size between child and sash window.
- Return type:
int
- GetMaximumSizeX(self)¶
Gets the maximum window size in the x direction.
- Return type:
int
- GetMaximumSizeY(self)¶
Gets the maximum window size in the y direction.
- Return type:
int
- GetMinimumSizeX(self)¶
Gets the minimum window size in the x direction.
- Return type:
int
- GetMinimumSizeY(self)¶
Gets the minimum window size in the y direction.
- Return type:
int
- GetSashVisible(self, edge)¶
Returns
True
if a sash is visible on the given edge,False
otherwise.- Parameters:
edge (SashEdgePosition) – Edge. One of
wx.adv.SASH_TOP
,wx.adv.SASH_RIGHT
,wx.adv.SASH_BOTTOM
,wx.adv.SASH_LEFT
.- Return type:
bool
See also
- SashHitTest(self, x, y, tolerance=2)¶
Tests for x, y over sash.
- Parameters:
x (int)
y (int)
tolerance (int)
- Return type:
- SetDefaultBorderSize(self, width)¶
Sets the default sash border size.
- Parameters:
width (int)
- Return type:
None
- SetExtraBorderSize(self, width)¶
Sets the additional border size between child and sash window.
- Parameters:
width (int)
- Return type:
None
- SetMaximumSizeX(self, min)¶
Sets the maximum window size in the x direction.
- Parameters:
min (int)
- Return type:
None
- SetMaximumSizeY(self, min)¶
Sets the maximum window size in the y direction.
- Parameters:
min (int)
- Return type:
None
- SetMinimumSizeX(self, min)¶
Sets the minimum window size in the x direction.
- Parameters:
min (int)
- Return type:
None
- SetMinimumSizeY(self, min)¶
Sets the minimum window size in the y direction.
- Parameters:
min (int)
- Return type:
None
- SetSashVisible(self, edge, visible)¶
Call this function to make a sash visible or invisible on a particular edge.
- Parameters:
edge (SashEdgePosition) – Edge to change. One of
wx.adv.SASH_TOP
,wx.adv.SASH_RIGHT
,wx.adv.SASH_BOTTOM
,wx.adv.SASH_LEFT
.visible (bool) –
True
to make the sash visible,False
to make it invisible.
- Return type:
None
See also
- SizeWindows(self)¶
Resizes subwindows.
- Return type:
None
Properties¶
- DefaultBorderSize¶
- ExtraBorderSize¶
See
GetExtraBorderSize
andSetExtraBorderSize
- MaximumSizeX¶
See
GetMaximumSizeX
andSetMaximumSizeX
- MaximumSizeY¶
See
GetMaximumSizeY
andSetMaximumSizeY
- MinimumSizeX¶
See
GetMinimumSizeX
andSetMinimumSizeX
- MinimumSizeY¶
See
GetMinimumSizeY
andSetMinimumSizeY