Re: GtkComboBoxTextEntry for input of multi-digits numbers
- From: Stefan Salewski <mail ssalewski de>
- To: Paul Davis <paul linuxaudiosystems com>
- Cc: gtk-list gnome org
- Subject: Re: GtkComboBoxTextEntry for input of multi-digits numbers
- Date: Wed, 21 Mar 2012 01:33:32 +0100
On Tue, 2012-03-20 at 19:30 -0400, Paul Davis wrote:
> On Tue, Mar 20, 2012 at 7:13 PM, Stefan Salewski <mail ssalewski de> wrote:
>
> > I was going to use
> > http://developer.gnome.org/gtk3/stable/GtkComboBoxText.html
> > with text entry. The problem is, that I have to connect to "changed"
> > signal, which is emitted on every keystroke. So I get "7" followed by
> > "75" for active text when user input is "75". There seems to be no way
> > to wait for the enter key pressed.
>
> you want the "activate" signal.
Yes, you may be right. From
http://developer.gnome.org/gtk/2.24/GtkComboBoxEntry.html
we have
>The changed signal will be emitted while typing into a
>GtkComboBoxEntry, as well as when selecting an item from the
>GtkComboBoxEntry's list. Use gtk_combo_box_get_active() or
>gtk_combo_box_get_active_iter() to discover whether an item was
>actually selected from the list.
>Connect to the activate signal of the GtkEntry (use
>gtk_bin_get_child()) to detect when the user actually finishes entering
>text.
I found that with google now -- have not seen similar text for GTK3
docs...
I will test that tomorrow.
I still wonder if GtkSpinButton is a better way to go. But seems
difficult too, and ComboBox should be more convenient and faster for the
user.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]