diff options
| author | Greg Ercolano <erco@seriss.com> | 2013-03-18 20:00:04 +0000 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2013-03-18 20:00:04 +0000 |
| commit | 684ad6910ba204ee86274bd8d15594322b60de41 (patch) | |
| tree | 104c46af34e73b426f55482a5dfe9809f85e8c01 /examples/table-spreadsheet-with-keyboard-nav.cxx | |
| parent | fdca0bcde18fd94c209fd1bfe8f82f45b290fe2e (diff) | |
Added Fl::option() setting to allow arrow keys to navigate table.
This example was written before 1.3, and was dependent on the 'old' FLTK behavior
where arrow keys could be used to navigate widget focus (in addition to Tab).
The 'new' FLTK behavior (1.3 and up) disables arrow key focus nav by default,
which is bad for this program, so we enable the old FLTK behavior with Fl::option().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9838 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'examples/table-spreadsheet-with-keyboard-nav.cxx')
| -rw-r--r-- | examples/table-spreadsheet-with-keyboard-nav.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/table-spreadsheet-with-keyboard-nav.cxx b/examples/table-spreadsheet-with-keyboard-nav.cxx index e675e4ee7..03ba747f5 100644 --- a/examples/table-spreadsheet-with-keyboard-nav.cxx +++ b/examples/table-spreadsheet-with-keyboard-nav.cxx @@ -290,6 +290,7 @@ void setrows_cb(Fl_Widget* w, void* v) { } int main() { + Fl::option(Fl::OPTION_ARROW_FOCUS, 1); // we want arrow keys to navigate table's widgets Fl_Double_Window *win = new Fl_Double_Window(922, 382, "Fl_Table Spreadsheet with Keyboard Navigation"); Spreadsheet* table = new Spreadsheet(20, 20, win->w()-80, win->h()-80); // Table rows |
