wxZRColaCharGrid now forwards Tab key to allow classic dialog control navigation
This commit is contained in:
parent
f9ef646f22
commit
01c50ba9e1
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxZRColaCharGrid, wxGrid)
|
BEGIN_EVENT_TABLE(wxZRColaCharGrid, wxGrid)
|
||||||
EVT_SIZE(wxZRColaCharGrid::OnSize)
|
EVT_SIZE(wxZRColaCharGrid::OnSize)
|
||||||
|
EVT_KEY_DOWN(wxZRColaCharGrid::OnKeyDown)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
@ -106,3 +107,21 @@ void wxZRColaCharGrid::OnSize(wxSizeEvent& event)
|
|||||||
EndBatch();
|
EndBatch();
|
||||||
m_isResizing = false;
|
m_isResizing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxZRColaCharGrid::OnKeyDown(wxKeyEvent& event)
|
||||||
|
{
|
||||||
|
wxWindow *parentWnd;
|
||||||
|
|
||||||
|
if (event.GetKeyCode() == WXK_TAB && (parentWnd = GetParent()) != NULL) {
|
||||||
|
wxNavigationKeyEvent eventNav;
|
||||||
|
eventNav.SetDirection(!event.ShiftDown());
|
||||||
|
eventNav.SetWindowChange(event.ControlDown());
|
||||||
|
eventNav.SetEventObject(this);
|
||||||
|
|
||||||
|
if (parentWnd->HandleWindowEvent(eventNav))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
@ -54,6 +54,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void OnSize(wxSizeEvent& event);
|
void OnSize(wxSizeEvent& event);
|
||||||
|
void OnKeyDown(wxKeyEvent& event);
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user