diff --git a/interface/wx/sizer.h b/interface/wx/sizer.h index f346f22cd0..2e37e10f9d 100644 --- a/interface/wx/sizer.h +++ b/interface/wx/sizer.h @@ -1636,11 +1636,12 @@ public: /** @class wxStaticBoxSizer - wxStaticBoxSizer is a sizer derived from wxBoxSizer but adds a static - box around the sizer. - This static box may be either created independently or the sizer may create - it itself as a convenience. In any case, the sizer owns the wxStaticBox control - and will delete it, if it is deleted. + wxStaticBoxSizer is a sizer derived from wxBoxSizer but adds a static box around + the sizer. + + The static box may be either created independently or the sizer may create it + itself as a convenience. In any case, the sizer owns the wxStaticBox control + and will delete it in the wxStaticBoxSizer destructor. @library{wxcore} @category{winlayout} @@ -1653,8 +1654,11 @@ public: /** This constructor uses an already existing static box. - It takes the associated static box and the orientation @a orient, which - can be either @c wxVERTICAL or @c wxHORIZONTAL as parameters. + @param box + The static box to associate with the sizer (which will take its + ownership). + @param orient + Can be either @c wxVERTICAL or @c wxHORIZONTAL. */ wxStaticBoxSizer(wxStaticBox* box, int orient); diff --git a/interface/wx/statbox.h b/interface/wx/statbox.h index b69eace3d8..250ba09fcc 100644 --- a/interface/wx/statbox.h +++ b/interface/wx/statbox.h @@ -9,24 +9,27 @@ /** @class wxStaticBox - A static box is a rectangle drawn around other panel items to denote + A static box is a rectangle drawn around other windows to denote a logical grouping of items. Please note that a static box should @b not be used as the parent for the - controls it contains, instead they should be siblings of each other. Although - using a static box as a parent might work in some versions of wxWidgets, it - results in a crash under, for example, wxGTK. + controls it contains, instead they should be @b siblings of each other. + Although using a static box as a parent might work in some ports of wxWidgets, + it would result in a crash under, for example, wxGTK, and thus it's explicitely + disallowed (an assertion will fail if you try to add children to a wxStaticBox). Also, please note that because of this, the order in which you create new controls is important. Create your wxStaticBox control @b before any siblings that are to appear inside the wxStaticBox in order to preserve the - correct Z-Order of controls. + correct Z-order of controls. + + You may want to use wxStaticBoxSizer instead of wxStaticBox to avoid this problem. @library{wxcore} @category{ctrl} @appearance{staticbox.png} - @see wxStaticText + @see wxStaticText, wxStaticBoxSizer */ class wxStaticBox : public wxControl { @@ -47,10 +50,10 @@ public: Text to be displayed in the static box, the empty string for no label. @param pos Window position. - If wxDefaultPosition is specified then a default position is chosen. + If ::wxDefaultPosition is specified then a default position is chosen. @param size Checkbox size. - If wxDefaultSize is specified then a default size is chosen. + If ::wxDefaultSize is specified then a default size is chosen. @param style Window style. See wxStaticBox. @param name