Question about gtk.ComboBoxEntry

hello there all,

i cannot seem to find how to set the active text in a gtk.ComboBoxEntry.
i can populate it with a list of items using the append_text(item) method.
but i cannot seem to find how to actually set the item i want to be active.

thanks for any tips

shawn

Hi

your_combo_box_entry.active = x

Cheers
detlef

···

Am Dienstag, den 07.08.2007, 00:57 +0900 schrieb shawn bright:

hello there all,

i cannot seem to find how to set the active text in a gtk.ComboBoxEntry.
i can populate it with a list of items using the append_text(item) method.
but i cannot seem to find how to actually set the item i want to be active.

thanks for any tips

shawn

shawn bright wrote:

i cannot seem to find how to set the active text in a gtk.ComboBoxEntry.
i can populate it with a list of items using the append_text(item) method.
but i cannot seem to find how to actually set the item i want to be active.

look in the superclass:
   Gtk::ComboBox.set_active( index )

but you have to work out index yourself, rather than passing in the text item.

ruby-gnome2 has its own mailing list which is more suited for questions like this:
ruby-gnome2-devel-en List Signup and Options

martin.

thanks !

···

On 8/6/07, Detlef Reichl <detlef.reichl@gmx.org> wrote:

Am Dienstag, den 07.08.2007, 00:57 +0900 schrieb shawn bright:
> hello there all,
>
> i cannot seem to find how to set the active text in a gtk.ComboBoxEntry.
> i can populate it with a list of items using the append_text(item)
method.
> but i cannot seem to find how to actually set the item i want to be
active.
>
> thanks for any tips
>
> shawn

Hi

your_combo_box_entry.active = x

Cheers
detlef

thanks for the tip on the mailing list, joining now.
thanks for the tips

shawn

···

On 8/8/07, Martin Portman <martin.portman@iptest.com> wrote:

shawn bright wrote:
> i cannot seem to find how to set the active text in a gtk.ComboBoxEntry.
> i can populate it with a list of items using the append_text(item)
method.
> but i cannot seem to find how to actually set the item i want to be
active.

look in the superclass:
   Gtk::ComboBox.set_active( index )

but you have to work out index yourself, rather than passing in
the text item.

ruby-gnome2 has its own mailing list which is more suited for
questions like this:
https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en

martin.