OK,
i am using ruby-gnome2 to develop a gui app.
I have a combobox that i create with Gtk.ComboBox.new
this is so i can populate it with append_text() and prepend_text()
my question is, i need to be able to set it to a certain value.
like if I have a list of items that i have used to append text to this combo,
apple, 0
orange, 1
pear, 2
grapes, 3
and another function selects say grapes, how do i set the combobox to
show that selection automatically ?
On Tue, 6 Mar 2007 05:11:13 +0900 "shawn bright" <nephish@gmail.com> wrote:
OK,
i am using ruby-gnome2 to develop a gui app.
I have a combobox that i create with Gtk.ComboBox.new
this is so i can populate it with append_text() and prepend_text()
my question is, i need to be able to set it to a certain value.
like if I have a list of items that i have used to append text to this combo,
apple, 0
orange, 1
pear, 2
grapes, 3
and another function selects say grapes, how do i set the combobox to
show that selection automatically ?
On 3/5/07, Jonathan Hudson <jh+ruby-lang@daria.co.uk> wrote:
On Tue, 6 Mar 2007 05:11:13 +0900 > "shawn bright" <nephish@gmail.com> wrote:
> OK,
> i am using ruby-gnome2 to develop a gui app.
> I have a combobox that i create with Gtk.ComboBox.new
> this is so i can populate it with append_text() and prepend_text()
>
> my question is, i need to be able to set it to a certain value.
> like if I have a list of items that i have used to append text to this combo,
> apple, 0
> orange, 1
> pear, 2
> grapes, 3
>
> and another function selects say grapes, how do i set the combobox to
> show that selection automatically ?
>