]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/nbsizer.tex
Added '\' before all '_' chars that were not inside VERBATIM blocks
[wxWidgets.git] / docs / latex / wx / nbsizer.tex
CommitLineData
85ec2f26
RR
1\section{\class{wxNotebookSizer}}\label{wxnotebooksizer}
2
3wxNotebookSizer is a specialized sizer to make sizers work in connection
4with using notebooks. This sizer is different from any other sizer as
5you must not add any children to it - instead, it queries the notebook class itself.
6The only thing this sizer does is to determine the size of the biggest
7page of the notebook and report an adjusted minimal size to a more toplevel
8sizer.
9
10In order to query the size of notebook page, this page needs to have its
11own sizer, otherwise the wxNotebookSizer will ignore it. Notebook pages
fa482912 12get there sizer by assiging one to them using \helpref{wxWindow::SetSizer}{wxwindowsetsizer}
85ec2f26 13and setting the auto-layout option to TRUE using
f6bcfd97 14\helpref{wxWindow::SetAutoLayout}{wxwindowsetautolayout}. Here is one
85ec2f26
RR
15example showing how to add a notebook page that the notebook sizer is
16aware of:
17
18\begin{verbatim}
19 wxNotebook *notebook = new wxNotebook( &dialog, -1 );
20 wxNotebookSizer *nbs = new wxNotebookSizer( notebook );
21
22 // Add panel as notebook page
23 wxPanel *panel = new wxPanel( notebook, -1 );
24 notebook->AddPage( panel, "My Notebook Page" );
25
26 wxBoxSizer *panelsizer = new wxBoxSizer( wxVERTICAL );
27
28 // Add controls to panel and panelsizer here...
29
30 panel->SetAutoLayout( TRUE );
31 panel->SetSizer( panelsizer );
32\end{verbatim}
33
34See also \helpref{wxSizer}{wxsizer}, \helpref{wxNotebook}{wxnotebook}.
35
36\wxheading{Derived from}
37
38\helpref{wxSizer}{wxsizer}\\
39\helpref{wxObject}{wxobject}
40
41\latexignore{\rtfignore{\wxheading{Members}}}
42
43\membersection{wxNotebookSizer::wxNotebookSizer}\label{wxnotebooksizerwxnotebooksizer}
44
45\func{}{wxNotebookSizer}{\param{wxNotebook* }{notebook}}
46
47Constructor. It takes an associated notebook as its only parameter.
48
49\membersection{wxNotebookSizer::GetNotebook}\label{wxnotebooksizergetnotebook}
50
51\func{wxNotebook*}{GetNotebook}{\void}
52
53Returns the notebook associated with the sizer.
54