mirror of
https://github.com/fltk/fltk.git
synced 2026-05-20 12:41:27 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user