[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Entry widget and default OK button
- From: Andrew Wood <ivarch cus umist ac uk>
- To: gtk-app-devel-list redhat com
- cc: Jan Rychter <jwr rgstudio com pl>
- Subject: Re: Entry widget and default OK button
- Date: Sat, 2 Oct 1999 14:57:18 +0100 (BST)
I don't know how you do this in Guile, but in C the code (generated by
Glade) looks like this:
accel_group = gtk_accel_group_new ();
gtk_widget_add_accelerator (button1, "clicked", accel_group,
GDK_Return, 0,
GTK_ACCEL_VISIBLE);
gtk_window_add_accel_group (GTK_WINDOW (window1), accel_group);
... where "button1" is an "OK" button packed inside a window, "window1". So,
when Return is pressed, the button acts as though it had been clicked.
Hope this helps.
- Andrew
On 2 Oct 1999, Jan Rychter wrote:
> I know this question must have been asked before, but looking through
> the list archives and docs I couldn't find an answer.
>
> I have a dialog with an entry widget and a default OK button. I'd like
> the user to be able to just press Enter after entering something into
> the entry widget to exit the dialog. However, that does not seem to
> work.
>
> How do I make the entry widget "default-capable"? Do I have to intercept
> the keypress events and look for Enter being pressed?
>
> BTW: I'm using guile-gtk.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]