Setting a window's default widget



Hello all,

I am trying to set a button in my window to the "default" widget. The code I'm using is as follows:

   default_button->set_flags(Gtk::CAN_DEFAULT);
   default_button->grab_default();
   activate_default();

and is in the constructor for my window. This code is called after the button in question has been added to the window.

Upon execution and the enter key is pressed, nothing happens. Any ideas on what I'm omitting or doing wrong here?

Thanks,

Bob Caryl <bob fis-cal com>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]