This version of the patch might be a bit better, though I'm not
convinced the behaviour is striclty identical to before - the "password"
test now shows a default focus, pre-patch it had no defualt selected, as
far as I can tell... Though it seems to be OK in the "new" way?

Index: src/fl_ask.cxx
===================================================================
--- src/fl_ask.cxx      (revision 8516)
+++ src/fl_ask.cxx      (working copy)
@@ -99,6 +99,7 @@
   o->color(FL_WHITE);
   o->labelcolor(FL_BLUE);
  }
+ w->end(); // don't add the buttons automatically
  // create the buttons (right to left)
  for (int b=0, x=310; b<3; b++, x -= 100) {
    if (b==1)
@@ -109,6 +110,11 @@
    button[b]->callback(button_cb,(void *)b);
  }
  button[0]->shortcut(FL_Escape);
+ // add the buttons (left to right)
+ for (int b=2; b>=0; b--)
+   w->add(button[b]);
+ Fl::focus(button[0]); // give the focus to button 0
+ w->begin();
  w->resizable(new Fl_Box(60,10,110-60,27));
  w->end();
  w->set_modal();



SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to