1 \section{wxSplitterWindow overview
}\label{wxsplitterwindowoverview
}
3 Classes:
\helpref{wxSplitterWindow
}{wxsplitterwindow
}
5 The following screenshot shows the appearance of a splitter window with a vertical split.
7 $$
\image{8cm;
0cm
}{splitter.eps
}$$
9 The style wxSP
\_3D has been used to show a
3D border and
3D sash.
13 The following fragment shows how to create a splitter window, creating two
14 subwindows and hiding one of them.
18 splitter = new wxSplitterWindow(this, -
1, wxPoint(
0,
0), wxSize(
400,
400), wxSP_3D);
20 leftWindow = new MyWindow(splitter);
21 leftWindow->SetScrollbars(
20,
20,
50,
50);
23 rightWindow = new MyWindow(splitter);
24 rightWindow->SetScrollbars(
20,
20,
50,
50);
25 rightWindow->Show(FALSE);
27 splitter->Initialize(leftWindow);
29 // Set this to prevent unsplitting
30 // splitter->SetMinimumPaneSize(
20);
34 The next fragment shows how the splitter window can be manipulated after creation.
38 void MyFrame::OnSplitVertical(wxCommandEvent& event)
40 if ( splitter->IsSplit() )
42 leftWindow->Show(TRUE);
43 rightWindow->Show(TRUE);
44 splitter->SplitVertically( leftWindow, rightWindow );
47 void MyFrame::OnSplitHorizontal(wxCommandEvent& event)
49 if ( splitter->IsSplit() )
51 leftWindow->Show(TRUE);
52 rightWindow->Show(TRUE);
53 splitter->SplitHorizontally( leftWindow, rightWindow );
56 void MyFrame::OnUnsplit(wxCommandEvent& event)
58 if ( splitter->IsSplit() )