]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/statbox.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxStaticBox
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
12 A static box is a rectangle drawn around other windows to denote
13 a logical grouping of items.
15 Note that since wxWidgets 2.9.0 you are encouraged to build the windows which are
16 placed inside wxStaticBoxes as children of the wxStaticBox itself:
19 wxStaticBox *stbox = new wxStaticBox(parentWindow, wxID_ANY, "StaticBox");
21 new wxStaticText(stbox, "This window is a child of the staticbox");
25 Creating the windows which are placed inside wxStaticBoxes as siblings of the
26 wxStaticBox is still allowed but it's deprecated as it gives some problems
27 (e.g. relative to tooltips) on some ports.
29 Also note that there is a specialized wxSizer class (wxStaticBoxSizer) which can
30 be used as an easier way to pack items into a static box.
34 @appearance{staticbox.png}
36 @see wxStaticText, wxStaticBoxSizer
38 class wxStaticBox
: public wxControl
47 Constructor, creating and showing a static box.
50 Parent window. Must not be @NULL.
52 Window identifier. The value wxID_ANY indicates a default value.
54 Text to be displayed in the static box, the empty string for no label.
57 If ::wxDefaultPosition is specified then a default position is chosen.
60 If ::wxDefaultSize is specified then a default size is chosen.
62 Window style. See wxStaticBox.
68 wxStaticBox(wxWindow
* parent
, wxWindowID id
,
69 const wxString
& label
,
70 const wxPoint
& pos
= wxDefaultPosition
,
71 const wxSize
& size
= wxDefaultSize
,
73 const wxString
& name
= wxStaticBoxNameStr
);
76 Destructor, destroying the group box.
78 virtual ~wxStaticBox();
81 Creates the static box for two-step construction.
82 See wxStaticBox() for further details.
84 bool Create(wxWindow
* parent
, wxWindowID id
, const wxString
& label
,
85 const wxPoint
& pos
= wxDefaultPosition
,
86 const wxSize
& size
= wxDefaultSize
, long style
= 0,
87 const wxString
& name
= wxStaticBoxNameStr
);