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 \wxheading{Derived from
}
10 \helpref{wxWindow
}{wxwindow
}\\
11 \helpref{wxEvtHandler
}{wxevthandler
}\\
12 \helpref{wxObject
}{wxobject
}
14 \wxheading{Include files
}
18 \wxheading{Window styles
}
20 There are no specific styles for this window.
22 See also
\helpref{window styles overview
}{windowstyles
}.
26 By default, a panel has the same colouring as a dialog.
28 A panel may be loaded from a wxWindows resource file (extension
{\tt wxr
}).
32 \helpref{wxDialog
}{wxdialog
}
34 \latexignore{\rtfignore{\wxheading{Members
}}}
36 \membersection{wxPanel::wxPanel
}\label{wxpanelconstr
}
38 \func{}{wxPanel
}{\void}
42 \func{}{wxPanel
}{\param{wxWindow*
}{parent
},
\param{wxWindowID
}{id
},
\rtfsp
43 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\rtfsp
44 \param{const wxSize\&
}{size = wxDefaultSize
},
\rtfsp
45 \param{long
}{ style = wxTAB
\_TRAVERSAL},
\rtfsp
46 \param{const wxString\&
}{name = ``panel"
}}
50 \wxheading{Parameters
}
52 \docparam{parent
}{The parent window.
}
54 \docparam{id
}{An identifier for the panel. A value of -
1 is taken to mean a default.
}
56 \docparam{pos
}{The panel position. A value of (-
1, -
1) indicates a default position, chosen by
57 either the windowing system or wxWindows, depending on platform.
}
59 \docparam{size
}{The panel size. A value of (-
1, -
1) indicates a default size, chosen by
60 either the windowing system or wxWindows, depending on platform.
}
62 \docparam{style
}{The window style. See
\helpref{wxPanel
}{wxpanel
}.
}
64 \docparam{name
}{Used to associate a name with the window,
65 allowing the application user to set Motif resource values for
66 individual dialog boxes.
}
70 \helpref{wxPanel::Create
}{wxpanelcreate
}
72 \membersection{wxPanel::
\destruct{wxPanel
}}
74 \func{}{\destruct{wxPanel
}}{\void}
76 Destructor. Deletes any child windows before deleting the physical window.
78 \membersection{wxPanel::Create
}\label{wxpanelcreate
}
80 \func{bool
}{Create
}{\param{wxWindow*
}{parent
},
\param{wxWindowID
}{id
},
\rtfsp
81 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\rtfsp
82 \param{const wxSize\&
}{size = wxDefaultSize
},
\rtfsp
83 \param{long
}{ style = wxTAB
\_TRAVERSAL},
\rtfsp
84 \param{const wxString\&
}{name = ``panel"
}}
86 Used for two-step panel construction. See
\helpref{wxPanel::wxPanel
}{wxpanelconstr
}\rtfsp
89 \membersection{wxPanel::InitDialog
}\label{wxpanelinitdialog
}
91 \func{void
}{InitDialog
}{\void}
93 Sends an
\helpref{wxWindow::OnInitDialog
}{wxwindowoninitdialog
} event, which
94 in turn transfers data to the dialog via validators.
98 \helpref{wxWindow::OnInitDialog
}{wxwindowoninitdialog
}
100 \membersection{wxPanel::OnSysColourChanged
}\label{wxpanelonsyscolourchanged
}
102 \func{void
}{OnSysColourChanged
}{\param{wxSysColourChangedEvent\&
}{event
}}
104 The default handler for wxEVT
\_SYS\_COLOUR\_CHANGED.
106 \wxheading{Parameters
}
108 \docparam{event
}{The colour change event.
}
112 Changes the panel's colour to conform to the current settings (Windows only).
113 Add an event table entry for your panel class if you wish the behaviour
114 to be different (such as keeping a user-defined
115 background colour). If you do override this function, call
\helpref{wxWindow::OnSysColourChanged
}{wxwindowonsyscolourchanged
} to
116 propagate the notification to child windows and controls.
120 \helpref{wxSysColourChangedEvent
}{wxsyscolourchangedevent
}