wxpanela panel is a window on which controls are placed. it is usually placed within a frame. it contains minimal extra functionality over and above its parent class wxwindow; its main purpose is to be similar in appearance and functionality to a dialog, but with the flexibility of having any window as a parent. note: if not all characters are being intercepted by your onkeydown or onchar handler, it may be because you are using the wxtab_traversal style, which grabs some keypresses for use by child controls. derived from
wxwindow include files <wx/panel.h> window styles there are no specific styles for this window. see also window styles overview. remarks by default, a panel has the same colouring as a dialog. see also members
wxpanel::wxpanel
wxpanel::wxpanelwxpanel() default constructor. wxpanel(wxwindow* parent, wxwindowid id = wxid_any, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxtab_traversal, const wxstring& name = "panel") constructor. parameters parent
id
pos
size
style
name
see also
wxpanel::~wxpanel~wxpanel() destructor. deletes any child windows before deleting the physical window.
wxpanel::createbool create(wxwindow* parent, wxwindowid id = wxid_any, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxtab_traversal, const wxstring& name = "panel") used for two-step panel construction. see wxpanel::wxpanel for details.
wxpanel::initdialogvoid initdialog() sends a wxinitdialogevent, which in turn transfers data to the dialog via validators. see also
wxpanel::onsyscolourchangedvoid onsyscolourchanged(wxsyscolourchangedevent& event) the default handler for wxevt_sys_colour_changed. parameters event
remarks changes the panel's colour to conform to the current settings (windows only). add an event table entry for your panel class if you wish the behaviour to be different (such as keeping a user-defined background colour). if you do override this function, call wxevent::skip to propagate the notification to child windows and controls. see also
wxpanel::setfocusvirtual void setfocus() overrides wxwindow::setfocus. this method uses the (undocumented) mix-in class wxcontrolcontainer which manages the focus and tab logic for controls which usually have child controls. in practice, if you call this method and the control has at least one child window, the focus will be given to the child window. see also wxfocusevent wxwindow::setfocus
wxpanel::setfocusignoringchildrenvirtual void setfocusignoringchildren() in contrast to wxpanel::setfocus (see above) this will set the focus to the panel even of there are child windows in the panel. this is only rarely needed. see also wxfocusevent wxpanel::setfocus
|