]>
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 Please note that a static box should @b not be used as the parent for the
16 controls it contains, instead they should be @b siblings of each other.
17 Although using a static box as a parent might work in some ports of wxWidgets,
18 it would result in a crash under, for example, wxGTK, and thus it's explicitely
19 disallowed (an assertion will fail if you try to add children to a wxStaticBox).
21 Also, please note that because of this, the order in which you create new
22 controls is important. Create your wxStaticBox control @b before any
23 siblings that are to appear inside the wxStaticBox in order to preserve the
24 correct Z-order of controls.
26 You may want to use wxStaticBoxSizer instead of wxStaticBox to avoid this problem.
30 @appearance{staticbox.png}
32 @see wxStaticText, wxStaticBoxSizer
34 class wxStaticBox
: public wxControl
43 Constructor, creating and showing a static box.
46 Parent window. Must not be @NULL.
48 Window identifier. The value wxID_ANY indicates a default value.
50 Text to be displayed in the static box, the empty string for no label.
53 If ::wxDefaultPosition is specified then a default position is chosen.
56 If ::wxDefaultSize is specified then a default size is chosen.
58 Window style. See wxStaticBox.
64 wxStaticBox(wxWindow
* parent
, wxWindowID id
,
65 const wxString
& label
,
66 const wxPoint
& pos
= wxDefaultPosition
,
67 const wxSize
& size
= wxDefaultSize
,
69 const wxString
& name
= wxStaticBoxNameStr
);
72 Destructor, destroying the group box.
74 virtual ~wxStaticBox();
77 Creates the static box for two-step construction.
78 See wxStaticBox() for further details.
80 bool Create(wxWindow
* parent
, wxWindowID id
, const wxString
& label
,
81 const wxPoint
& pos
= wxDefaultPosition
,
82 const wxSize
& size
= wxDefaultSize
, long style
= 0,
83 const wxString
& name
= wxStaticBoxNameStr
);