]>
git.saurik.com Git - wxWidgets.git/blob - docs/doxygen/overviews/splitterwindow.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: splitterwindow.h
3 // Purpose: topic overview
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
10 @page overview_splitterwindow wxSplitterWindow Overview
18 @section overview_splitterwindow_appearance Appearance
20 The following screenshot shows the appearance of a splitter window with a
23 The style wxSP_3D has been used to show a 3D border and 3D sash.
25 @image html overview_splitter_3d.png
28 @section overview_splitterwindow_example Example
30 The following fragment shows how to create a splitter window, creating two
31 subwindows and hiding one of them.
34 splitter = new wxSplitterWindow(this, -1, wxPoint(0, 0),
35 wxSize(400, 400), wxSP_3D);
37 leftWindow = new MyWindow(splitter);
38 leftWindow->SetScrollbars(20, 20, 50, 50);
40 rightWindow = new MyWindow(splitter);
41 rightWindow->SetScrollbars(20, 20, 50, 50);
42 rightWindow->Show(false);
44 splitter->Initialize(leftWindow);
46 // Set this to prevent unsplitting
47 // splitter->SetMinimumPaneSize(20);
50 The next fragment shows how the splitter window can be manipulated after
54 void MyFrame::OnSplitVertical(wxCommandEvent& event)
56 if ( splitter->IsSplit() )
58 leftWindow->Show(true);
59 rightWindow->Show(true);
60 splitter->SplitVertically( leftWindow, rightWindow );
63 void MyFrame::OnSplitHorizontal(wxCommandEvent& event)
65 if ( splitter->IsSplit() )
67 leftWindow->Show(true);
68 rightWindow->Show(true);
69 splitter->SplitHorizontally( leftWindow, rightWindow );
72 void MyFrame::OnUnsplit(wxCommandEvent& event)
74 if ( splitter->IsSplit() )