1 \section{\class{wxPanel
}}\label{wxpanel
}
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.
8 {\it Note:
} if not all characters are being intercepted by your OnKeyDown or OnChar handler,
9 it may be because you are using the wxTAB
\_TRAVERSAL style, which grabs some keypresses for use
12 \wxheading{Derived from
}
14 \helpref{wxWindow
}{wxwindow
}\\
15 \helpref{wxEvtHandler
}{wxevthandler
}\\
16 \helpref{wxObject
}{wxobject
}
18 \wxheading{Include files
}
22 \wxheading{Window styles
}
24 There are no specific styles for this window.
26 See also
\helpref{window styles overview
}{windowstyles
}.
30 By default, a panel has the same colouring as a dialog.
32 A panel may be loaded from a wxWindows resource file (extension
{\tt wxr
}).
36 \helpref{wxDialog
}{wxdialog
}
38 \latexignore{\rtfignore{\wxheading{Members
}}}
40 \membersection{wxPanel::wxPanel
}\label{wxpanelconstr
}
42 \func{}{wxPanel
}{\void}
46 \func{}{wxPanel
}{\param{wxWindow*
}{parent
},
\param{wxWindowID
}{id
},
\rtfsp
47 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\rtfsp
48 \param{const wxSize\&
}{size = wxDefaultSize
},
\rtfsp
49 \param{long
}{ style = wxTAB
\_TRAVERSAL},
\rtfsp
50 \param{const wxString\&
}{name = ``panel"
}}
54 \wxheading{Parameters
}
56 \docparam{parent
}{The parent window.
}
58 \docparam{id
}{An identifier for the panel. A value of -
1 is taken to mean a default.
}
60 \docparam{pos
}{The panel position. A value of (-
1, -
1) indicates a default position, chosen by
61 either the windowing system or wxWindows, depending on platform.
}
63 \docparam{size
}{The panel size. A value of (-
1, -
1) indicates a default size, chosen by
64 either the windowing system or wxWindows, depending on platform.
}
66 \docparam{style
}{The window style. See
\helpref{wxPanel
}{wxpanel
}.
}
68 \docparam{name
}{Used to associate a name with the window,
69 allowing the application user to set Motif resource values for
70 individual dialog boxes.
}
74 \helpref{wxPanel::Create
}{wxpanelcreate
}
76 \membersection{wxPanel::
\destruct{wxPanel
}}
78 \func{}{\destruct{wxPanel
}}{\void}
80 Destructor. Deletes any child windows before deleting the physical window.
82 \membersection{wxPanel::Create
}\label{wxpanelcreate
}
84 \func{bool
}{Create
}{\param{wxWindow*
}{parent
},
\param{wxWindowID
}{id
},
\rtfsp
85 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\rtfsp
86 \param{const wxSize\&
}{size = wxDefaultSize
},
\rtfsp
87 \param{long
}{ style = wxTAB
\_TRAVERSAL},
\rtfsp
88 \param{const wxString\&
}{name = ``panel"
}}
90 Used for two-step panel construction. See
\helpref{wxPanel::wxPanel
}{wxpanelconstr
}\rtfsp
93 \membersection{wxPanel::InitDialog
}\label{wxpanelinitdialog
}
95 \func{void
}{InitDialog
}{\void}
97 Sends an
\helpref{wxWindow::OnInitDialog
}{wxwindowoninitdialog
} event, which
98 in turn transfers data to the dialog via validators.
102 \helpref{wxWindow::OnInitDialog
}{wxwindowoninitdialog
}
104 \membersection{wxPanel::OnSysColourChanged
}\label{wxpanelonsyscolourchanged
}
106 \func{void
}{OnSysColourChanged
}{\param{wxSysColourChangedEvent\&
}{event
}}
108 The default handler for wxEVT
\_SYS\_COLOUR\_CHANGED.
110 \wxheading{Parameters
}
112 \docparam{event
}{The colour change event.
}
116 Changes the panel's colour to conform to the current settings (Windows only).
117 Add an event table entry for your panel class if you wish the behaviour
118 to be different (such as keeping a user-defined
119 background colour). If you do override this function, call
\helpref{wxWindow::OnSysColourChanged
}{wxwindowonsyscolourchanged
} to
120 propagate the notification to child windows and controls.
124 \helpref{wxSysColourChangedEvent
}{wxsyscolourchangedevent
}