]>
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
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
11 @page overview_splitterwindow wxSplitterWindow Overview
13 Classes: wxSplitterWindow
15 @li @ref overview_splitterwindow_appearance
16 @li @ref overview_splitterwindow_example
21 @section overview_splitterwindow_appearance Appearance
23 The following screenshot shows the appearance of a splitter window with a
26 The style wxSP_3D has been used to show a 3D border and 3D sash.
28 @image html overview_splitter_3d.png
31 @section overview_splitterwindow_example Example
33 The following fragment shows how to create a splitter window, creating two
34 subwindows and hiding one of them.
37 splitter = new wxSplitterWindow(this, -1, wxPoint(0, 0),
38 wxSize(400, 400), wxSP_3D);
40 leftWindow = new MyWindow(splitter);
41 leftWindow->SetScrollbars(20, 20, 50, 50);
43 rightWindow = new MyWindow(splitter);
44 rightWindow->SetScrollbars(20, 20, 50, 50);
45 rightWindow->Show(false);
47 splitter->Initialize(leftWindow);
49 // Set this to prevent unsplitting
50 // splitter->SetMinimumPaneSize(20);
53 The next fragment shows how the splitter window can be manipulated after
57 void MyFrame::OnSplitVertical(wxCommandEvent& event)
59 if ( splitter->IsSplit() )
61 leftWindow->Show(true);
62 rightWindow->Show(true);
63 splitter->SplitVertically( leftWindow, rightWindow );
66 void MyFrame::OnSplitHorizontal(wxCommandEvent& event)
68 if ( splitter->IsSplit() )
70 leftWindow->Show(true);
71 rightWindow->Show(true);
72 splitter->SplitHorizontally( leftWindow, rightWindow );
75 void MyFrame::OnUnsplit(wxCommandEvent& event)
77 if ( splitter->IsSplit() )