]> git.saurik.com Git - wxWidgets.git/blame - docs/doxygen/overviews/splitterwindow.h
Fix column sorting UI in wxDataViewCtrl under wxOSX.
[wxWidgets.git] / docs / doxygen / overviews / splitterwindow.h
CommitLineData
15b6757b 1/////////////////////////////////////////////////////////////////////////////
23114fe1 2// Name: splitterwindow.h
15b6757b
FM
3// Purpose: topic overview
4// Author: wxWidgets team
526954c5 5// Licence: wxWindows licence
15b6757b
FM
6/////////////////////////////////////////////////////////////////////////////
7
880efa2a 8/**
36c9828f 9
23114fe1 10@page overview_splitterwindow wxSplitterWindow Overview
36c9828f 11
831e1028 12@tableofcontents
36c9828f 13
831e1028 14@see wxSplitterWindow
30738aae 15
30738aae
FM
16
17
18@section overview_splitterwindow_appearance Appearance
19
23114fe1
BP
20The following screenshot shows the appearance of a splitter window with a
21horizontal split.
36c9828f 22
23114fe1 23The style wxSP_3D has been used to show a 3D border and 3D sash.
36c9828f 24
de2b67e6 25@image html overview_splitter_3d.png
36c9828f 26
36c9828f 27
23114fe1 28@section overview_splitterwindow_example Example
36c9828f 29
23114fe1
BP
30The following fragment shows how to create a splitter window, creating two
31subwindows and hiding one of them.
36c9828f 32
23114fe1
BP
33@code
34splitter = new wxSplitterWindow(this, -1, wxPoint(0, 0),
35 wxSize(400, 400), wxSP_3D);
36c9828f 36
23114fe1
BP
37leftWindow = new MyWindow(splitter);
38leftWindow->SetScrollbars(20, 20, 50, 50);
36c9828f 39
23114fe1
BP
40rightWindow = new MyWindow(splitter);
41rightWindow->SetScrollbars(20, 20, 50, 50);
42rightWindow->Show(false);
36c9828f 43
23114fe1 44splitter->Initialize(leftWindow);
36c9828f 45
23114fe1
BP
46// Set this to prevent unsplitting
47// splitter->SetMinimumPaneSize(20);
48@endcode
36c9828f 49
23114fe1
BP
50The next fragment shows how the splitter window can be manipulated after
51creation.
36c9828f 52
23114fe1
BP
53@code
54void MyFrame::OnSplitVertical(wxCommandEvent& event)
55{
56 if ( splitter->IsSplit() )
57 splitter->Unsplit();
58 leftWindow->Show(true);
59 rightWindow->Show(true);
60 splitter->SplitVertically( leftWindow, rightWindow );
61}
36c9828f 62
23114fe1
BP
63void MyFrame::OnSplitHorizontal(wxCommandEvent& event)
64{
65 if ( splitter->IsSplit() )
66 splitter->Unsplit();
67 leftWindow->Show(true);
68 rightWindow->Show(true);
69 splitter->SplitHorizontally( leftWindow, rightWindow );
70}
36c9828f 71
23114fe1
BP
72void MyFrame::OnUnsplit(wxCommandEvent& event)
73{
74 if ( splitter->IsSplit() )
75 splitter->Unsplit();
76}
77@endcode
36c9828f 78
23114fe1 79*/