]>
git.saurik.com Git - wxWidgets.git/blob - docs/doxygen/overviews/splitterwindow.h
17cbfdf9658eb3fe93378b0e94d500bb22fada78
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: splitterwindow.h
3 // Purpose: topic overview
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
11 @page overview_splitterwindow wxSplitterWindow Overview
19 @section overview_splitterwindow_appearance Appearance
21 The following screenshot shows the appearance of a splitter window with a
24 The style wxSP_3D has been used to show a 3D border and 3D sash.
26 @image html overview_splitter_3d.png
29 @section overview_splitterwindow_example Example
31 The following fragment shows how to create a splitter window, creating two
32 subwindows and hiding one of them.
35 splitter = new wxSplitterWindow(this, -1, wxPoint(0, 0),
36 wxSize(400, 400), wxSP_3D);
38 leftWindow = new MyWindow(splitter);
39 leftWindow->SetScrollbars(20, 20, 50, 50);
41 rightWindow = new MyWindow(splitter);
42 rightWindow->SetScrollbars(20, 20, 50, 50);
43 rightWindow->Show(false);
45 splitter->Initialize(leftWindow);
47 // Set this to prevent unsplitting
48 // splitter->SetMinimumPaneSize(20);
51 The next fragment shows how the splitter window can be manipulated after
55 void MyFrame::OnSplitVertical(wxCommandEvent& event)
57 if ( splitter->IsSplit() )
59 leftWindow->Show(true);
60 rightWindow->Show(true);
61 splitter->SplitVertically( leftWindow, rightWindow );
64 void MyFrame::OnSplitHorizontal(wxCommandEvent& event)
66 if ( splitter->IsSplit() )
68 leftWindow->Show(true);
69 rightWindow->Show(true);
70 splitter->SplitHorizontally( leftWindow, rightWindow );
73 void MyFrame::OnUnsplit(wxCommandEvent& event)
75 if ( splitter->IsSplit() )