Contents Up Previous Next

wxSashWindow

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::wxSashWindow

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::~wxSashWindow

~wxSashWindow()

Destructor.


wxSashWindow::GetSashVisible

bool GetSashVisible(wxSashEdgePosition edge) const

Returns true if a sash is visible on the given edge, false otherwise.

Parameters

edge

See also

wxSashWindow::SetSashVisible


wxSashWindow::GetMaximumSizeX

int GetMaximumSizeX() const

Gets the maximum window size in the x direction.


wxSashWindow::GetMaximumSizeY

int GetMaximumSizeY() const

Gets the maximum window size in the y direction.


wxSashWindow::GetMinimumSizeX

int GetMinimumSizeX()

Gets the minimum window size in the x direction.


wxSashWindow::GetMinimumSizeY

int GetMinimumSizeY() const

Gets the minimum window size in the y direction.


wxSashWindow::HasBorder

bool HasBorder(wxSashEdgePosition edge) const

Returns true if the sash has a border, false otherwise. This function is obsolete since the sash border property is unused.

Parameters

edge

See also

wxSashWindow::SetSashBorder


wxSashWindow::SetMaximumSizeX

void SetMaximumSizeX(int min)

Sets the maximum window size in the x direction.


wxSashWindow::SetMaximumSizeY

void SetMaximumSizeY(int min)

Sets the maximum window size in the y direction.


wxSashWindow::SetMinimumSizeX

void SetMinimumSizeX(int min)

Sets the minimum window size in the x direction.


wxSashWindow::SetMinimumSizeY

void SetMinimumSizeY(int min)

Sets the minimum window size in the y direction.


wxSashWindow::SetSashVisible

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

wxSashWindow::GetSashVisible


wxSashWindow::SetSashBorder

void SetSashBorder(wxSashEdgePosition edge, bool hasBorder)

Call this function to give the sash a border, or remove the border. This function is obsolete since the sash border property is unused.

Parameters

edge

hasBorder

See also

wxSashWindow::HasBorder