From 684ad6910ba204ee86274bd8d15594322b60de41 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Mon, 18 Mar 2013 20:00:04 +0000 Subject: [PATCH] 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 --- examples/table-spreadsheet-with-keyboard-nav.cxx | 1 + 1 file changed, 1 insertion(+) 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