Re: [gtkmm] How can I obtain index of selection? (Gtk::Combo)



>> The index then is available via a call to
>> my_map[my_combo->get_entry()->get_text()].
>
> You can also make a non-viewable column for the index, and set that as
> you append items.  It's always retrievable from the selected row, and
> you don't have to maintain a map.

He's talking about the deprecated Gtk::Combo widget, but I think you are
talking about the new Gtk::ComboBox widget. With the ComboBox you would
probably want to use the TreeModel::iterator instead of an index anyway.

Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]