]>
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 license
7 /////////////////////////////////////////////////////////////////////////////
11 @page overview_splitterwindow wxSplitterWindow Overview
13 Classes: wxSplitterWindow
15 The following screenshot shows the appearance of a splitter window with a
18 The style wxSP_3D has been used to show a 3D border and 3D sash.
20 @image html splitter.bmp
23 @section overview_splitterwindow_example Example
25 The following fragment shows how to create a splitter window, creating two
26 subwindows and hiding one of them.
29 splitter = new wxSplitterWindow(this, -1, wxPoint(0, 0),
30 wxSize(400, 400), wxSP_3D);
32 leftWindow = new MyWindow(splitter);
33 leftWindow->SetScrollbars(20, 20, 50, 50);
35 rightWindow = new MyWindow(splitter);
36 rightWindow->SetScrollbars(20, 20, 50, 50);
37 rightWindow->Show(false);
39 splitter->Initialize(leftWindow);
41 // Set this to prevent unsplitting
42 // splitter->SetMinimumPaneSize(20);
45 The next fragment shows how the splitter window can be manipulated after
49 void MyFrame::OnSplitVertical(wxCommandEvent& event)
51 if ( splitter->IsSplit() )
53 leftWindow->Show(true);
54 rightWindow->Show(true);
55 splitter->SplitVertically( leftWindow, rightWindow );
58 void MyFrame::OnSplitHorizontal(wxCommandEvent& event)
60 if ( splitter->IsSplit() )
62 leftWindow->Show(true);
63 rightWindow->Show(true);
64 splitter->SplitHorizontally( leftWindow, rightWindow );
67 void MyFrame::OnUnsplit(wxCommandEvent& event)
69 if ( splitter->IsSplit() )