1 \section{\class{wxPropertySheetDialog
}}\label{wxpropertysheetdialog
}
3 This class represents a property sheet dialog: a tabbed dialog
4 for showing settings. It is optimized to show flat tabs
5 on PocketPC devices, and can be customized to use different
6 controllers instead of the default notebook style.
8 To use this class, call
\helpref{wxPropertySheetDialog::Create
}{wxpropertysheetdialogcreate
} from your own
9 Create function. Then call
\helpref{CreateButtons
}{wxpropertysheetdialogcreatebuttons
}, and create pages, adding them to the book control.
10 Finally call
\helpref{LayoutDialog
}{wxpropertysheetdialoglayoutdialog
}.
15 bool MyPropertySheetDialog::Create(...)
17 if (!wxPropertySheetDialog::Create(...))
20 CreateButtons(wxOK|wxCANCEL|wxHELP);
23 wxPanel* panel = new wxPanel(GetBookCtrl(), ...);
24 GetBookCtrl()->AddPage(panel, wxT("General"));
31 If necessary, override CreateBookCtrl and AddBookCtrl to create and add a different
32 kind of book control. You would then need to use two-step construction for the dialog.
33 Or, change the style of book control by calling
\helpref{SetSheetStyle
}{wxpropertysheetdialogsetsheetstyle
}
34 before calling Create.
36 The dialogs sample shows this class being used with notebook and toolbook controllers (for
37 Windows-style and Mac-style settings dialogs).
39 \wxheading{Derived from
}
41 \helpref{wxDialog
}{wxdialog
}\\
42 \helpref{wxWindow
}{wxwindow
}\\
43 \helpref{wxEvtHandler
}{wxevthandler
}\\
44 \helpref{wxObject
}{wxobject
}
46 \wxheading{Include files
}
49 <wx/generic/propdlg.h>
52 \helpref{wxAdv
}{librarieslist
}
55 \latexignore{\rtfignore{\wxheading{Members
}}}
57 \membersection{wxPropertySheetDialog::wxPropertySheetDialog
}\label{wxpropertysheetdialogctor
}
59 \func{}{wxPropertySheetDialog
}{\param{wxWindow*
}{parent
},
\param{wxWindowID
}{id
},
\rtfsp
60 \param{const wxString\&
}{title
},
\rtfsp
61 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\rtfsp
62 \param{const wxSize\&
}{size = wxDefaultSize
},
\rtfsp
63 \param{long
}{ style = wxDEFAULT
\_DIALOG\_STYLE},
\rtfsp
64 \param{const wxString\&
}{name = ``dialogBox"
}}
68 \membersection{wxPropertySheetDialog::AddBookCtrl
}\label{wxpropertysheetdialogaddbookctrl
}
70 \func{virtual void
}{AddBookCtrl
}{\param{wxSizer*
}{sizer
}}
72 Override this if you wish to add the book control in a way different from the
73 standard way (for example, using different spacing).
75 \membersection{wxPropertySheetDialog::Create
}\label{wxpropertysheetdialogcreate
}
77 \func{bool
}{Create
}{\param{wxWindow*
}{parent
},
\param{wxWindowID
}{id
},
\rtfsp
78 \param{const wxString\&
}{title
},
\rtfsp
79 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\rtfsp
80 \param{const wxSize\&
}{size = wxDefaultSize
},
\rtfsp
81 \param{long
}{ style = wxDEFAULT
\_DIALOG\_STYLE},
\rtfsp
82 \param{const wxString\&
}{name = ``dialogBox"
}}
84 Call this from your own Create function, before adding buttons and pages.
86 \membersection{wxPropertySheetDialog::CreateBookCtrl
}\label{wxpropertysheetdialogcreatebookctrl
}
88 \func{virtual wxBookCtrlBase*
}{CreateBookCtrl
}{\void}
90 Override this if you wish to create a different kind of book control; by default, the value
91 passed to
\helpref{SetSheetStyle
}{wxpropertysheetdialogsetsheetstyle
} is used to determine the control.
92 The default behaviour is to create a notebook except on Smartphone, where a choicebook is used.
94 \membersection{wxPropertySheetDialog::CreateButtons
}\label{wxpropertysheetdialogcreatebuttons
}
96 \func{void
}{CreateButtons
}{\param{int
}{flags=wxOK|wxCANCEL
}}
98 Call this to create the buttons for the dialog. This calls
\helpref{wxDialog::CreateButtonSizer
}{wxdialogcreatebuttonsizer
}, and
99 the flags are the same. On PocketPC, no buttons are created.
101 \membersection{wxPropertySheetDialog::GetBookCtrl
}\label{wxpropertysheetdialoggetbookctrl
}
103 \constfunc{wxBookCtrlBase*
}{GetBookCtrl
}{\void}
105 Returns the book control that will contain your settings pages.
107 \membersection{wxPropertySheetDialog::GetInnerSizer
}\label{wxpropertysheetdialoggetinnersizer
}
109 \constfunc{wxSizer*
}{GetInnerSizer
}{\void}
111 Returns the inner sizer that contains the book control and button sizer.
113 \membersection{wxPropertySheetDialog::GetSheetStyle
}\label{wxpropertysheetdialoggetsheetstyle
}
115 \constfunc{long
}{GetSheetStyle
}{\void}
117 Returns the sheet style. See
\helpref{SetSheetStyle
}{wxpropertysheetdialogsetsheetstyle
} for
120 \membersection{wxPropertySheetDialog::LayoutDialog
}\label{wxpropertysheetdialoglayoutdialog
}
122 \func{void
}{LayoutDialog
}{\param{int
}{ centreFlags=wxBOTH
}}
124 Call this to lay out the dialog. On PocketPC, this does nothing, since the dialog will be shown
125 full-screen, and the layout will be done when the dialog receives a size event.
127 \membersection{wxPropertySheetDialog::SetBookCtrl
}\label{wxpropertysheetdialogsetbookctrl
}
129 \func{void
}{SetBookCtrl
}{\param{wxBookCtrlBase*
}{bookCtrl
}}
131 Sets the book control used for the dialog. You will normally not need to use this.
133 \membersection{wxPropertySheetDialog::SetInnerSizer
}\label{wxpropertysheetdialogsetinnersizer
}
135 \func{void
}{SetInnerSizer
}{\param{wxSizer*
}{ sizer
}}
137 Sets the inner sizer that contains the book control and button sizer. You will normally not need to use this.
139 \membersection{wxPropertySheetDialog::SetSheetStyle
}\label{wxpropertysheetdialogsetsheetstyle
}
141 \func{void
}{SetSheetStyle
}{\param{long
}{ style
}}
143 You can customize the look and feel of the dialog by setting the sheet style. It is
144 a bit list of the following values:
147 \begin{twocollist
}\itemsep=
0pt
148 \twocolitem{wxPROPSHEET
\_DEFAULT}{Uses the default look and feel for the controller window,
149 normally a notebook except on Smartphone where a choice control is used.
}
150 \twocolitem{wxPROPSHEET
\_NOTEBOOK}{Uses a notebook for the controller window.
}
151 \twocolitem{wxPROPSHEET
\_TOOLBOOK}{Uses a toolbook for the controller window.
}
152 \twocolitem{wxPROPSHEET
\_CHOICEBOOK}{Uses a choicebook for the controller window.
}
153 \twocolitem{wxPROPSHEET
\_LISTBOOK}{Uses a listbook for the controller window.
}
154 \twocolitem{wxPROPSHEET
\_TREEBOOK}{Uses a treebook for the controller window.
}
155 \twocolitem{wxPROPSHEET
\_SHRINKTOFIT}{Shrinks the dialog window to fit the currently selected page (common behaviour for
156 property sheets on Mac OS X).
}