]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/doxygen/overviews/splitterwindow.h
Fix broken and missing DataView interface items for Phoenix
[wxWidgets.git] / docs / doxygen / overviews / splitterwindow.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: splitterwindow.h
3// Purpose: topic overview
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows licence
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10
11@page overview_splitterwindow wxSplitterWindow Overview
12
13@tableofcontents
14
15@see wxSplitterWindow
16
17
18
19@section overview_splitterwindow_appearance Appearance
20
21The following screenshot shows the appearance of a splitter window with a
22horizontal split.
23
24The style wxSP_3D has been used to show a 3D border and 3D sash.
25
26@image html overview_splitter_3d.png
27
28
29@section overview_splitterwindow_example Example
30
31The following fragment shows how to create a splitter window, creating two
32subwindows and hiding one of them.
33
34@code
35splitter = new wxSplitterWindow(this, -1, wxPoint(0, 0),
36 wxSize(400, 400), wxSP_3D);
37
38leftWindow = new MyWindow(splitter);
39leftWindow->SetScrollbars(20, 20, 50, 50);
40
41rightWindow = new MyWindow(splitter);
42rightWindow->SetScrollbars(20, 20, 50, 50);
43rightWindow->Show(false);
44
45splitter->Initialize(leftWindow);
46
47// Set this to prevent unsplitting
48// splitter->SetMinimumPaneSize(20);
49@endcode
50
51The next fragment shows how the splitter window can be manipulated after
52creation.
53
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}
63
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}
72
73void MyFrame::OnUnsplit(wxCommandEvent& event)
74{
75 if ( splitter->IsSplit() )
76 splitter->Unsplit();
77}
78@endcode
79
80*/