]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/panel.tex
Small mods to manual
[wxWidgets.git] / docs / latex / wx / panel.tex
1 \section{\class{wxPanel}}\label{wxpanel}
2
3 A panel is a window on which controls are placed. It is usually placed within a frame.
4 It contains minimal extra functionality over and above its parent class wxWindow; its main
5 purpose is to be similar in appearance and functionality to a dialog, but with the flexibility of
6 having any window as a parent.
7
8 \wxheading{Derived from}
9
10 \helpref{wxWindow}{wxwindow}\\
11 \helpref{wxEvtHandler}{wxevthandler}\\
12 \helpref{wxObject}{wxobject}
13
14 \wxheading{Window styles}
15
16 There are no specific styles for this window.
17
18 See also \helpref{window styles overview}{windowstyles}.
19
20 \wxheading{Remarks}
21
22 By default, a panel has the same colouring as a dialog.
23
24 A panel may be loaded from a wxWindows resource file (extension {\tt wxr}).
25
26 \wxheading{See also}
27
28 \helpref{wxDialog}{wxdialog}
29
30 \latexignore{\rtfignore{\wxheading{Members}}}
31
32 \membersection{wxPanel::wxPanel}\label{wxpanelconstr}
33
34 \func{}{wxPanel}{\void}
35
36 Default constructor.
37
38 \func{}{wxPanel}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id},\rtfsp
39 \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
40 \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
41 \param{const long}{ style = wxTAB\_TRAVERSAL},\rtfsp
42 \param{const wxString\& }{name = ``panel"}}
43
44 Constructor.
45
46 \wxheading{Parameters}
47
48 \docparam{parent}{The parent window.}
49
50 \docparam{id}{An identifier for the panel. A value of -1 is taken to mean a default.}
51
52 \docparam{pos}{The panel position. A value of (-1, -1) indicates a default position, chosen by
53 either the windowing system or wxWindows, depending on platform.}
54
55 \docparam{size}{The panel size. A value of (-1, -1) indicates a default size, chosen by
56 either the windowing system or wxWindows, depending on platform.}
57
58 \docparam{style}{The window style. See \helpref{wxPanel}{wxpanel}.}
59
60 \docparam{name}{Used to associate a name with the window,
61 allowing the application user to set Motif resource values for
62 individual dialog boxes.}
63
64 \wxheading{See also}
65
66 \helpref{wxPanel::Create}{wxpanelcreate}
67
68 \membersection{wxPanel::\destruct{wxPanel}}
69
70 \func{}{\destruct{wxPanel}}{\void}
71
72 Destructor. Deletes any child windows before deleting the physical window.
73
74 \membersection{wxPanel::Create}\label{wxpanelcreate}
75
76 \func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id},\rtfsp
77 \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
78 \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
79 \param{const long}{ style = wxTAB\_TRAVERSAL},\rtfsp
80 \param{const wxString\& }{name = ``panel"}}
81
82 Used for two-step panel construction. See \helpref{wxPanel::wxPanel}{wxpanelconstr}\rtfsp
83 for details.
84
85 \membersection{wxPanel::InitDialog}\label{wxpanelinitdialog}
86
87 \func{void}{InitDialog}{\void}
88
89 Sends an \helpref{wxWindow::OnInitDialog}{wxwindowoninitdialog} event, which
90 in turn transfers data to the dialog via validators.
91
92 \wxheading{See also}
93
94 \helpref{wxWindow::OnInitDialog}{wxwindowoninitdialog}
95
96 \membersection{wxPanel::OnSysColourChanged}\label{wxpanelonsyscolourchanged}
97
98 \func{void}{OnSysColourChanged}{\param{wxSysColourChangedEvent\& }{event}}
99
100 The default handler for wxEVT\_SYS\_COLOUR\_CHANGED.
101
102 \wxheading{Parameters}
103
104 \docparam{event}{The colour change event.}
105
106 \wxheading{Remarks}
107
108 Changes the panel's colour to conform to the current settings (Windows only).
109 Add an event table entry for your panel class if you wish the behaviour
110 to be different (such as keeping a user-defined
111 background colour). If you do override this function, call \helpref{wxWindow::OnSysColourChanged}{wxwindowonsyscolourchanged} to
112 propagate the notification to child windows and controls.
113
114 \wxheading{See also}
115
116 \helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}
117
118