[prev in list] [next in list] [prev in thread] [next in thread]
List: gtk-app-devel
Subject: Re: GtkEntry and default buttons. GtkEntry eats the "Enter"
From: John Cupitt <john.cupitt () ng-london ! org ! uk>
Date: 2001-03-28 8:59:10
[Download RAW message or body]
Hi Norman, you can also do a grab_default to get the OK button to
highlight when the entry has focus. gtkfilesel does this:
--
gtk_signal_connect_object (GTK_OBJECT (entry), "focus_in_event",
GTK_SIGNAL_FUNC (gtk_widget_grab_default), GTK_OBJECT (ok_button));
gtk_signal_connect_object (GTK_OBJECT (entry), "activate",
GTK_SIGNAL_FUNC (gtk_button_clicked), GTK_OBJECT (ok_button));
--
HTH, John
Jeff Shipman wrote:
>
> Hook up the "activate" signal of the entry to
> emit the "clicked" signal on your default button.
>
> Jeff "Shippy" Shipman E-Mail: shippy@nmt.edu
> Computer Science Major ICQ: 1786493
> New Mexico Institute of Mining and Technology
> Homepage: http://www.nmt.edu/~shippy
>
> On Tue, 27 Mar 2001, Norman Black wrote:
>
> > I have a dialog with a GtkEntry (GtkCombo also has this issue) and the
> > dialog has a default button.
> > Entering text and pressing Enter does not activate the default button. You
> > have to tab off of any control with a GtkEditable and then you can press
> > enter to activate the default button.
> >
> > How can I get the desired behavior. I must be missing something because this
> > is too obvious to have been missed.
> >
> > Best Regards,
> > Norman Black
> > Stony Brook Software
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic