Re: [INIMSS] How to make a default button.



Dino Cherian K <inimss yahoo com> writes:
> 
> How can I make a button click when I press Enter from another widget in
> the dialog.
> 

If the other widget is a GtkEntry, the usual way is to connect
gtk_window_activate_default() to the "activate" signal on the entry:

 gtk_signal_connect_object (entry, "activate", 
                            gtk_window_activate_default, 
                            toplevel_dialog_window);

If you are using GTK 2, just call 
gtk_entry_set_activates_default() instead of making the signal 
connection.

Havoc



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