Improvements to keyboard handling (TAB)

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@660 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-09-02 01:03:37 +00:00
parent 4840ba824c
commit 100d48b5a7
19 changed files with 105 additions and 54 deletions
+8 -1
View File
@@ -798,7 +798,7 @@ void GraphContainer::add(const GraphP& graph) {
// ----------------------------------------------------------------------------- : GraphControl
GraphControl::GraphControl(Window* parent, int id)
: wxControl(parent, id)
: wxControl(parent, id, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS)
{}
void GraphControl::setLayout(GraphType type) {
@@ -912,6 +912,13 @@ void GraphControl::onChar(wxKeyEvent& ev) {
onSelectionChange();
}
break;
case WXK_TAB: {
// send a navigation event to our parent, to select another control
// we need this because of wxWANTS_CHARS
wxNavigationKeyEvent nev;
nev.SetDirection(!ev.ShiftDown());
GetParent()->ProcessEvent(nev);
} break;
}
}