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
This commit is contained in:
Greg Ercolano 2013-03-18 20:00:04 +00:00
parent fdca0bcde1
commit 684ad6910b
1 changed files with 1 additions and 0 deletions

View File

@ -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