Russell Markus wrote:
> I am a Glade/GTK newbie and I am building an application similar to a chat
> program.  I have a GtkComboBox field where the user can type in his message
> and I would like to be able to send the message when the user presses the
> enter key.  Currently, when the user presses the enter key, the combo list
> drops down.  Is there a way to trap the enter key so that I can send the
> message?
>
> Thanks for any help.
>
> Russell Markus
> Sr. Software Engineer
> IPMobileNet, Inc.
> (949)417-4590 
>
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
>   
Use the "key-press-event" if the keycode is the enter key, and return 
TRUE from the handler to prevent the event from being further 
propogated. I created a little demo app for which the source can be seen 
here: http://www.gtkforums.com/viewtopic.php?p=457

-- 
- Micah Carrick
  Freelance Developer
  http://www.micahcarrick.com | http://www.gtkforums.com

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to