]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/panel.tex
say that EVT_TEXT_ENTER requires wxTE_PROCESS_ENTER to be set (closes bug 659948)
[wxWidgets.git] / docs / latex / wx / panel.tex
CommitLineData
a660d684
KB
1\section{\class{wxPanel}}\label{wxpanel}
2
3A panel is a window on which controls are placed. It is usually placed within a frame.
4It contains minimal extra functionality over and above its parent class wxWindow; its main
5purpose is to be similar in appearance and functionality to a dialog, but with the flexibility of
6having any window as a parent.
7
b23386b2
JS
8{\it Note:} if not all characters are being intercepted by your OnKeyDown or OnChar handler,
9it may be because you are using the wxTAB\_TRAVERSAL style, which grabs some keypresses for use
10by child controls.
11
a660d684
KB
12\wxheading{Derived from}
13
14\helpref{wxWindow}{wxwindow}\\
15\helpref{wxEvtHandler}{wxevthandler}\\
16\helpref{wxObject}{wxobject}
17
954b8ae6
JS
18\wxheading{Include files}
19
20<wx/panel.h>
21
a660d684
KB
22\wxheading{Window styles}
23
24There are no specific styles for this window.
25
26See also \helpref{window styles overview}{windowstyles}.
27
28\wxheading{Remarks}
29
30By default, a panel has the same colouring as a dialog.
31
32A panel may be loaded from a wxWindows resource file (extension {\tt wxr}).
33
34\wxheading{See also}
35
36\helpref{wxDialog}{wxdialog}
37
38\latexignore{\rtfignore{\wxheading{Members}}}
39
40\membersection{wxPanel::wxPanel}\label{wxpanelconstr}
41
42\func{}{wxPanel}{\void}
43
44Default constructor.
45
2b5f62a0 46\func{}{wxPanel}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = $-1$},\rtfsp
a660d684
KB
47\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
48\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
eaaa6a06 49\param{long}{ style = wxTAB\_TRAVERSAL},\rtfsp
a660d684
KB
50\param{const wxString\& }{name = ``panel"}}
51
52Constructor.
53
54\wxheading{Parameters}
55
56\docparam{parent}{The parent window.}
57
58\docparam{id}{An identifier for the panel. A value of -1 is taken to mean a default.}
59
60\docparam{pos}{The panel position. A value of (-1, -1) indicates a default position, chosen by
61either the windowing system or wxWindows, depending on platform.}
62
63\docparam{size}{The panel size. A value of (-1, -1) indicates a default size, chosen by
64either the windowing system or wxWindows, depending on platform.}
65
66\docparam{style}{The window style. See \helpref{wxPanel}{wxpanel}.}
67
68\docparam{name}{Used to associate a name with the window,
69allowing the application user to set Motif resource values for
70individual dialog boxes.}
71
72\wxheading{See also}
73
74\helpref{wxPanel::Create}{wxpanelcreate}
75
76\membersection{wxPanel::\destruct{wxPanel}}
77
78\func{}{\destruct{wxPanel}}{\void}
79
80Destructor. Deletes any child windows before deleting the physical window.
81
82\membersection{wxPanel::Create}\label{wxpanelcreate}
83
eaaa6a06 84\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp
a660d684
KB
85\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
86\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
eaaa6a06 87\param{long}{ style = wxTAB\_TRAVERSAL},\rtfsp
a660d684
KB
88\param{const wxString\& }{name = ``panel"}}
89
90Used for two-step panel construction. See \helpref{wxPanel::wxPanel}{wxpanelconstr}\rtfsp
91for details.
92
bd9724b9
VZ
93\membersection{wxPanel::GetDefaultItem}\label{wxpanelgetdefaultitem}
94
95\constfunc{wxButton*}{GetDefaultItem}{\void}
96
97Returns a pointer to the button which is the default for this window, or NULL.
98The default button is the one activated by pressing the Enter key.
99
a660d684
KB
100\membersection{wxPanel::InitDialog}\label{wxpanelinitdialog}
101
102\func{void}{InitDialog}{\void}
103
f4fcc291 104Sends a \helpref{wxInitDialogEvent}{wxinitdialogevent}, which
a660d684
KB
105in turn transfers data to the dialog via validators.
106
107\wxheading{See also}
108
f4fcc291 109\helpref{wxInitDialogEvent}{wxinitdialogevent}
a660d684
KB
110
111\membersection{wxPanel::OnSysColourChanged}\label{wxpanelonsyscolourchanged}
112
113\func{void}{OnSysColourChanged}{\param{wxSysColourChangedEvent\& }{event}}
114
115The default handler for wxEVT\_SYS\_COLOUR\_CHANGED.
116
117\wxheading{Parameters}
118
119\docparam{event}{The colour change event.}
120
121\wxheading{Remarks}
122
123Changes the panel's colour to conform to the current settings (Windows only).
124Add an event table entry for your panel class if you wish the behaviour
125to be different (such as keeping a user-defined
f4fcc291 126background colour). If you do override this function, call wxEvent::Skip to
a660d684
KB
127propagate the notification to child windows and controls.
128
129\wxheading{See also}
130
131\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}
132
bd9724b9
VZ
133\membersection{wxPanel::SetDefaultItem}\label{wxpanelsetdefaultitem}
134
135\func{void}{SetDefaultItem}{\param{wxButton }{*btn}}
136
137Changes the default button for the panel.
138
139\wxheading{See also}
a660d684 140
bd9724b9 141\helpref{GetDefaultItem}{wxpanelgetdefaultitem}
281b0186 142