On 20.02.2015 19:24
nj...@imap.cc wrote:
> Changed button.cxx.
> Added b3->take_focus();
>
> Compiled in ubuntu 14.10 32 bits running in virtualbox.
> Works in osx.
Which FLTK version? If it is not 1.3.3, please upgrade. If it is 1.3.3,
could you please try current svn or a recent snapshot?
> int main(int argc, char ** argv) {
> Fl_Window *window = new Fl_Window(320,65);
> Fl_Button *b1 = new Fl_Button(20, 20, 80, 25, "&Beep");
> b1->callback(beepcb,0);
> /*Fl_Button *b2 =*/ new Fl_Button(120,20, 80, 25, "&no op");
> Fl_Button *b3 = new Fl_Button(220,20, 80, 25, "E&xit");
> b3->callback(exitcb,0);
> b3->take_focus();
> window->end();
> window->show(argc,argv);
> #if 0
> Fl::add_fd(0, stdin_cb);
> #endif
> return Fl::run();
> }
This works well for me (Ubuntu 14.04 in Virtualbox VM) and shows the
intended effect ("Exit" button has focus).