#include <wx/panel.h>

wx/containr.h and wx/panel.h to find out how this is achieved.
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.
Public Member Functions | |
| wxPanel () | |
| wxPanel (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name="panel") | |
| ~wxPanel () | |
| bool | AcceptsFocus () const |
| bool | Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name="panel") |
| void | InitDialog () |
| void | OnSysColourChanged (wxSysColourChangedEvent &event) |
| virtual void | SetFocus () |
| virtual void | SetFocusIgnoringChildren () |
| wxPanel::wxPanel | ( | ) |
Default constructor.
| wxPanel::wxPanel | ( | wxWindow * | parent, | |
| wxWindowID | id = wxID_ANY, |
|||
| const wxPoint & | pos = wxDefaultPosition, |
|||
| const wxSize & | size = wxDefaultSize, |
|||
| long | style = wxTAB_TRAVERSAL, |
|||
| const wxString & | name = "panel" | |||
| ) |
Constructor.
| parent | The parent window. | |
| id | An identifier for the panel. wxID_ANY is taken to mean a default. | |
| pos | The panel position. The value wxDefaultPosition indicates a default position, chosen by either the windowing system or wxWidgets, depending on platform. | |
| size | The panel size. The value wxDefaultSize indicates a default size, chosen by either the windowing system or wxWidgets, depending on platform. | |
| style | The window style. See wxPanel. | |
| name | Window name. |
| wxPanel::~wxPanel | ( | ) |
Destructor. Deletes any child windows before deleting the physical window.
| bool wxPanel::AcceptsFocus | ( | ) | const [virtual] |
This method is overridden from wxWindow::AcceptsFocus() and returns true only if there is no child window in the panel which can accept the focus. This is reevaluated each time a child window is added or removed from the panel.
Reimplemented from wxWindow.
| bool wxPanel::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() for details.
Reimplemented in wxHtmlListBox, wxVListBox, wxVScrolledWindow, wxHScrolledWindow, wxHVScrolledWindow, and wxScrolled< wxPanel >.
| void wxPanel::InitDialog | ( | ) |
Sends a wxInitDialogEvent, which in turn transfers data to the dialog via validators.
Reimplemented from wxWindow.
| void wxPanel::OnSysColourChanged | ( | wxSysColourChangedEvent & | event | ) |
The default handler for wxEVT_SYS_COLOUR_CHANGED.
| event | The colour change event. |
| virtual void wxPanel::SetFocus | ( | ) | [virtual] |
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.
Reimplemented from wxWindow.
| virtual void wxPanel::SetFocusIgnoringChildren | ( | ) | [virtual] |
In contrast to SetFocus() (see above) this will set the focus to the panel even if there are child windows in the panel. This is only rarely needed.
|
[ top ] |