wxSashWindow 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 wxSashWindow. The window (or an ancestor) will be notified of a drag via a wxSashEvent notification.
Derived from
wxWindow
wxEvtHandler
wxObject
Include files
<wx/sashwin.h>
Window styles
The following styles apply in addition to the normal wxWindow styles.
wxSW_3D | Draws a 3D effect sash and border. |
wxSW_3DSASH | Draws a 3D effect sash. |
wxSW_3DBORDER | Draws a 3D effect border. |
wxSW_BORDER | Draws a thin black border. |
See also window styles overview.
Event handling
EVT_SASH_DRAGGED(id, func) | Process a wxEVT_SASH_DRAGGED event, when the user has finished dragging a sash. |
EVT_SASH_DRAGGED_RANGE(id1, id2, func) | 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. |
Data types
enum wxSashEdgePosition {
wxSASH_TOP = 0,
wxSASH_RIGHT,
wxSASH_BOTTOM,
wxSASH_LEFT,
wxSASH_NONE = 100
};
See also
wxSashEvent, wxSashLayoutWindow, Event handling overview
Members
wxSashWindow::wxSashWindow
wxSashWindow::~wxSashWindow
wxSashWindow::GetSashVisible
wxSashWindow::GetMaximumSizeX
wxSashWindow::GetMaximumSizeY
wxSashWindow::GetMinimumSizeX
wxSashWindow::GetMinimumSizeY
wxSashWindow::HasBorder
wxSashWindow::SetMaximumSizeX
wxSashWindow::SetMaximumSizeY
wxSashWindow::SetMinimumSizeX
wxSashWindow::SetMinimumSizeY
wxSashWindow::SetSashVisible
wxSashWindow::SetSashBorder
wxSashWindow()
Default constructor.
wxSashWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, const wxString& name = "sashWindow")
Constructs a sash window, which can be a child of a frame, dialog or any other non-control window.
Parameters
parent
id
pos
size
style
name
~wxSashWindow()
Destructor.
bool GetSashVisible(wxSashEdgePosition edge) const
Returns true if a sash is visible on the given edge, false otherwise.
Parameters
edge
See also
int GetMaximumSizeX() const
Gets the maximum window size in the x direction.
int GetMaximumSizeY() const
Gets the maximum window size in the y direction.
int GetMinimumSizeX()
Gets the minimum window size in the x direction.
int GetMinimumSizeY(int min) const
Gets the minimum window size in the y direction.
bool HasBorder(wxSashEdgePosition edge) const
Returns true if the sash has a border, false otherwise.
Parameters
edge
See also
void SetMaximumSizeX(int min)
Sets the maximum window size in the x direction.
void SetMaximumSizeY(int min)
Sets the maximum window size in the y direction.
void SetMinimumSizeX(int min)
Sets the minimum window size in the x direction.
void SetMinimumSizeY(int min)
Sets the minimum window size in the y direction.
void SetSashVisible(wxSashEdgePosition edge, bool visible)
Call this function to make a sash visible or invisible on a particular edge.
Parameters
edge
visible
See also
void SetSashBorder(wxSashEdgePosition edge, bool hasBorder)
Call this function to give the sash a border, or remove the border.
Parameters
edge
hasBorder
See also