Classes: \helpref{wxSizer}{wxsizer}, \helpref{wxGridSizer}{wxgridsizer},
\helpref{wxFlexGridSizer}{wxflexgridsizer}, \helpref{wxBoxSizer}{wxboxsizer},
\helpref{wxStaticBoxSizer}{wxstaticboxsizer},
-\helpref{wxNotebookSizer}{wxnotebooksizer}
+\helpref{wxNotebookSizer}{wxnotebooksizer},
+\helpref{CreateButtonSizer}{createbuttonsizer}
Sizers, as represented by the wxSizer class and its descendants in
the wxWindows class hierarchy, have become the method of choice to
It is the unique feature of a box sizer, that it can grow in both directions (height and
width) but can distribute its growth in the main direction (horizontal for a row) {\it unevenly}
among its children. In our example case, the vertical sizer is supposed to propagate all its
-height changes to only the text area, not to the button area. This is determined by the {\it option} parameter
+height changes to only the text area, not to the button area. This is determined by the {\it proportion} parameter
when adding a window (or another sizer) to a sizer. It is interpreted
as a weight factor, i.e. it can be zero, indicating that the window may not be resized
at all, or above zero. If several windows have a value above zero, the value is interpreted
0, // make vertically unstretchable
wxALIGN_CENTER ); // no border and centre horizontally
- SetAutoLayout( TRUE ); // tell dialog to use sizer
- SetSizer( topsizer ); // actually set the sizer
+ SetSizer( topsizer ); // use the sizer for layout
- topsizer->Fit( this ); // set size to minimum size as calculated by the sizer
- topsizer->SetSizeHints( this ); // set size hints to honour mininum size
+ topsizer->SetSizeHints( this ); // set size hints to honour minimum size
}
\end{verbatim}
In order to query the size of notebook page, this page needs to have its
own sizer, otherwise the wxNotebookSizer will ignore it. Notebook pages
-get their size by assigning one to them using \helpref{wxWindow::SetSizer}{wxwindowsetsizer}
+get their sizer by assigning one to them using \helpref{wxWindow::SetSizer}{wxwindowsetsizer}
and setting the auto-layout option to TRUE using
\helpref{wxWindow::SetAutoLayout}{wxwindowsetautolayout}. Here is one
example showing how to add a notebook page that the notebook sizer is
box around the sizer. Note that this static box has to be created
separately.
+\subsection{CreateButtonSizer}\label{createbuttonsizer}
+
+As a convenience, CreateButtonSizer ( long flags ) can be used to create a standard button sizer
+in which standard buttons are displayed. The following flags can be passed to this function:
+
+
+\begin{verbatim}
+ wxYES_NO // Add Yes/No subpanel
+ wxYES // return wxID_YES
+ wxNO // return wxID_NO
+ wxNO_DEFAULT // make the wxNO button the default, otherwise wxYES or wxOK button will be default
+
+ wxOK // return wxID_OK
+ wxCANCEL // return wxID_CANCEL
+ wxHELP // return wxID_HELP
+
+ wxFORWARD // return wxID_FORWARD
+ wxBACKWARD // return wxID_BACKWARD
+ wxSETUP // return wxID_SETUP
+ wxMORE // return wxID_MORE
+
+\end{verbatim}