Author: greg.ercolano
Date: 2013-03-18 13:00:04 -0700 (Mon, 18 Mar 2013)
New Revision: 9838
Log:
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().
Modified:
branches/branch-1.3/examples/table-spreadsheet-with-keyboard-nav.cxx
Modified: branches/branch-1.3/examples/table-spreadsheet-with-keyboard-nav.cxx
===================================================================
--- branches/branch-1.3/examples/table-spreadsheet-with-keyboard-nav.cxx
2013-03-17 06:06:52 UTC (rev 9837)
+++ branches/branch-1.3/examples/table-spreadsheet-with-keyboard-nav.cxx
2013-03-18 20:00:04 UTC (rev 9838)
@@ -290,6 +290,7 @@
}
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
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit