]> git.saurik.com Git - wxWidgets.git/blame - docs/doxygen/overviews/splitterwindow.h
Move wx/msw/gccpriv.h inclusion back to wx/platform.h from wx/compiler.h.
[wxWidgets.git] / docs / doxygen / overviews / splitterwindow.h
CommitLineData
15b6757b 1/////////////////////////////////////////////////////////////////////////////
23114fe1 2// Name: splitterwindow.h
15b6757b
FM
3// Purpose: topic overview
4// Author: wxWidgets team
5// RCS-ID: $Id$
526954c5 6// Licence: wxWindows licence
15b6757b
FM
7/////////////////////////////////////////////////////////////////////////////
8
880efa2a 9/**
36c9828f 10
23114fe1 11@page overview_splitterwindow wxSplitterWindow Overview
36c9828f 12
831e1028 13@tableofcontents
36c9828f 14
831e1028 15@see wxSplitterWindow
30738aae 16
30738aae
FM
17
18
19@section overview_splitterwindow_appearance Appearance
20
23114fe1
BP
21The following screenshot shows the appearance of a splitter window with a
22horizontal split.
36c9828f 23
23114fe1 24The style wxSP_3D has been used to show a 3D border and 3D sash.
36c9828f 25
de2b67e6 26@image html overview_splitter_3d.png
36c9828f 27
36c9828f 28
23114fe1 29@section overview_splitterwindow_example Example
36c9828f 30
23114fe1
BP
31The following fragment shows how to create a splitter window, creating two
32subwindows and hiding one of them.
36c9828f 33
23114fe1
BP
34@code
35splitter = new wxSplitterWindow(this, -1, wxPoint(0, 0),
36 wxSize(400, 400), wxSP_3D);
36c9828f 37
23114fe1
BP
38leftWindow = new MyWindow(splitter);
39leftWindow->SetScrollbars(20, 20, 50, 50);
36c9828f 40
23114fe1
BP
41rightWindow = new MyWindow(splitter);
42rightWindow->SetScrollbars(20, 20, 50, 50);
43rightWindow->Show(false);
36c9828f 44
23114fe1 45splitter->Initialize(leftWindow);
36c9828f 46
23114fe1
BP
47// Set this to prevent unsplitting
48// splitter->SetMinimumPaneSize(20);
49@endcode
36c9828f 50
23114fe1
BP
51The next fragment shows how the splitter window can be manipulated after
52creation.
36c9828f 53
23114fe1
BP
54@code
55void MyFrame::OnSplitVertical(wxCommandEvent& event)
56{
57 if ( splitter->IsSplit() )
58 splitter->Unsplit();
59 leftWindow->Show(true);
60 rightWindow->Show(true);
61 splitter->SplitVertically( leftWindow, rightWindow );
62}
36c9828f 63
23114fe1
BP
64void MyFrame::OnSplitHorizontal(wxCommandEvent& event)
65{
66 if ( splitter->IsSplit() )
67 splitter->Unsplit();
68 leftWindow->Show(true);
69 rightWindow->Show(true);
70 splitter->SplitHorizontally( leftWindow, rightWindow );
71}
36c9828f 72
23114fe1
BP
73void MyFrame::OnUnsplit(wxCommandEvent& event)
74{
75 if ( splitter->IsSplit() )
76 splitter->Unsplit();
77}
78@endcode
36c9828f 79
23114fe1 80*/