]>
git.saurik.com Git - wxWidgets.git/blob - docs/doxygen/overviews/splitterwindow.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: splitterwindow
3 // Purpose: topic overview
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
11 @page splitterwindow_overview wxSplitterWindow overview
13 Classes: #wxSplitterWindow
14 The following screenshot shows the appearance of a splitter window with a horizontal split.
16 The style wxSP_3D has been used to show a 3D border and 3D sash.
20 @section wxsplitterwindowexample Example
22 The following fragment shows how to create a splitter window, creating two
23 subwindows and hiding one of them.
27 splitter = new wxSplitterWindow(this, -1, wxPoint(0, 0), wxSize(400, 400), wxSP_3D);
29 leftWindow = new MyWindow(splitter);
30 leftWindow-SetScrollbars(20, 20, 50, 50);
32 rightWindow = new MyWindow(splitter);
33 rightWindow-SetScrollbars(20, 20, 50, 50);
34 rightWindow-Show(@false);
36 splitter-Initialize(leftWindow);
38 // Set this to prevent unsplitting
39 // splitter-SetMinimumPaneSize(20);
43 The next fragment shows how the splitter window can be manipulated after creation.
47 void MyFrame::OnSplitVertical(wxCommandEvent& event)
49 if ( splitter-IsSplit() )
51 leftWindow-Show(@true);
52 rightWindow-Show(@true);
53 splitter-SplitVertically( leftWindow, rightWindow );
56 void MyFrame::OnSplitHorizontal(wxCommandEvent& event)
58 if ( splitter-IsSplit() )
60 leftWindow-Show(@true);
61 rightWindow-Show(@true);
62 splitter-SplitHorizontally( leftWindow, rightWindow );
65 void MyFrame::OnUnsplit(wxCommandEvent& event)
67 if ( splitter-IsSplit() )