wx.SashLayoutWindow

Inheritance diagram for wx.SashLayoutWindow:



Description

wx.SashLayoutWindow responds to OnCalculateLayout events generated by wx.LayoutAlgorithm. It allows the application to use simple accessors to specify how the window should be laid out, rather than having to respond to events. The fact that the class derives from wx.SashWindow allows sashes to be used if required, to allow the windows to be user-resizable.

The documentation for wx.LayoutAlgorithm explains the purpose of this class in more detail.

Event Handling

This class handles the wx.EVT_QUERY_LAYOUT_INFO and wx.EVT_CALCULATE_LAYOUT events for you. However, if you use sashes, see wx.SashWindow for relevant event information.

Properties Summary

Class API

Methods

__init__(parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.CLIP_CHILDREN|wx.SW_3D, name=wx.SashLayoutNameStr)

Constructs a sash layout window, which can be a child of a frame, dialog or any other non-control window.

Parameters:


Returns:

wx.SashLayoutWindow


GetAlignment()

Returns the alignment of the window: one of wx.LAYOUT_TOP, wx.LAYOUT_LEFT, wx.LAYOUT_RIGHT, wx.LAYOUT_BOTTOM.


Returns:

int


GetOrientation()

Returns the orientation of the window: one of wx.LAYOUT_HORIZONTAL, wx.LAYOUT_VERTICAL.


Returns:

int


SetAlignment(alignment)

Sets the alignment of the window (which edge of the available parent client area the window is attached to). alignment is one of wx.LAYOUT_TOP, wx.LAYOUT_LEFT, wx.LAYOUT_RIGHT, wx.LAYOUT_BOTTOM.

Parameters:

  • alignment (int)

SetDefaultSize(size)

Sets the default dimensions of the window. The dimension other than the orientation will be fixed to this value, and the orientation dimension will be ignored and the window stretched to fit the available space.

Parameters:


SetOrientation(orientation)

Sets the orientation of the window (the direction the window will stretch in, to fill the available parent client area). orientation is one of wx.LAYOUT_HORIZONTAL, wx.LAYOUT_VERTICAL.

Parameters:

  • orientation (int)

Properties

Alignment
See GetAlignment and SetAlignment
Orientation
See GetOrientation and SetOrientation