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{Window styles
}
16 There are no specific styles for this window.
18 See also
\helpref{window styles overview
}{windowstyles
}.
22 By default, a panel has the same colouring as a dialog.
24 A panel may be loaded from a wxWindows resource file (extension
{\tt wxr
}).
28 \helpref{wxDialog
}{wxdialog
}
30 \latexignore{\rtfignore{\wxheading{Members
}}}
32 \membersection{wxPanel::wxPanel
}\label{wxpanelconstr
}
34 \func{}{wxPanel
}{\void}
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"
}}
46 \wxheading{Parameters
}
48 \docparam{parent
}{The parent window.
}
50 \docparam{id
}{An identifier for the panel. A value of -
1 is taken to mean a default.
}
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.
}
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.
}
58 \docparam{style
}{The window style. See
\helpref{wxPanel
}{wxpanel
}.
}
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.
}
66 \helpref{wxPanel::Create
}{wxpanelcreate
}
68 \membersection{wxPanel::
\destruct{wxPanel
}}
70 \func{}{\destruct{wxPanel
}}{\void}
72 Destructor. Deletes any child windows before deleting the physical window.
74 \membersection{wxPanel::Create
}\label{wxpanelcreate
}
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"
}}
82 Used for two-step panel construction. See
\helpref{wxPanel::wxPanel
}{wxpanelconstr
}\rtfsp
85 \membersection{wxPanel::InitDialog
}\label{wxpanelinitdialog
}
87 \func{void
}{InitDialog
}{\void}
89 Sends an
\helpref{wxWindow::OnInitDialog
}{wxwindowoninitdialog
} event, which
90 in turn transfers data to the dialog via validators.
94 \helpref{wxWindow::OnInitDialog
}{wxwindowoninitdialog
}
96 \membersection{wxPanel::OnSysColourChanged
}\label{wxpanelonsyscolourchanged
}
98 \func{void
}{OnSysColourChanged
}{\param{wxSysColourChangedEvent\&
}{event
}}
100 The default handler for wxEVT
\_SYS\_COLOUR\_CHANGED.
102 \wxheading{Parameters
}
104 \docparam{event
}{The colour change event.
}
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.
116 \helpref{wxSysColourChangedEvent
}{wxsyscolourchangedevent
}