]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/statbox.h
Correct wxDataViewCtrl::IsExpanded
[wxWidgets.git] / interface / wx / statbox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: statbox.h
3 // Purpose: interface of wxStaticBox
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxStaticBox
11
12 A static box is a rectangle drawn around other windows to denote
13 a logical grouping of items.
14
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:
17 @code
18 ...
19 wxStaticBox *stbox = new wxStaticBox(parentWindow, wxID_ANY, "StaticBox");
20
21 new wxStaticText(stbox, "This window is a child of the staticbox");
22 ...
23 @endcode
24
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.
28
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.
31
32 @library{wxcore}
33 @category{ctrl}
34 @appearance{staticbox.png}
35
36 @see wxStaticText, wxStaticBoxSizer
37 */
38 class wxStaticBox : public wxControl
39 {
40 public:
41 /**
42 Default constructor
43 */
44 wxStaticBox();
45
46 /**
47 Constructor, creating and showing a static box.
48
49 @param parent
50 Parent window. Must not be @NULL.
51 @param id
52 Window identifier. The value wxID_ANY indicates a default value.
53 @param label
54 Text to be displayed in the static box, the empty string for no label.
55 @param pos
56 Window position.
57 If ::wxDefaultPosition is specified then a default position is chosen.
58 @param size
59 Checkbox size.
60 If ::wxDefaultSize is specified then a default size is chosen.
61 @param style
62 Window style. See wxStaticBox.
63 @param name
64 Window name.
65
66 @see Create()
67 */
68 wxStaticBox(wxWindow* parent, wxWindowID id,
69 const wxString& label,
70 const wxPoint& pos = wxDefaultPosition,
71 const wxSize& size = wxDefaultSize,
72 long style = 0,
73 const wxString& name = wxStaticBoxNameStr);
74
75 /**
76 Destructor, destroying the group box.
77 */
78 virtual ~wxStaticBox();
79
80 /**
81 Creates the static box for two-step construction.
82 See wxStaticBox() for further details.
83 */
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);
88 };
89