On 3/8/07, TheLonelyStar <[EMAIL PROTECTED]> wrote:
>
> Hello dear community,
>
> I am iterating over the items of a TreeView/ListStore using
> Gtk::TreeModel::Children::iterator!
>
> Now I want to do something special, for the selected item.
> I tried:
>
> Gtk::TreeModel::Children::iterator i;
> Glib::RefPtr<Gtk::TreeSelection> refTreeSelection; //<-The selection is
> stored in here (using get_selection)
>
> for(...)
> {
> ...
> if(i==refTreeSelection->get_selected())
> ..
> }
>
> This does unfortantly not work.
>
> What would be the correct way?
> Thanks!
> NathanWhen you say that it doesn't work, you mean that the if() statement never evaluates to true? for example, if you put the following line inside the if statement, it would never print this line? std::cout << "I'm selected" << std::endl; At first glance, it seems like this approach should work. It might be helpful if you could post a minimal testcase to see if we can spot any errors in the code. -- jonner _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
