Re: [gtkmm] getting the content of a Row in a Treeview
- From: Andre Leubner <cyberrobbe gmx de>
- To: gtkmm-list gnome org
- Subject: Re: [gtkmm] getting the content of a Row in a Treeview
- Date: Sat, 7 Jun 2003 08:03:10 +0200
Matthew Walton <matthew alledora co uk> wrote:
> Use the TreePath to build an iterator which points at the activated row.
> Dereferencing the iterator will then obtain the Row object required. I
> have code that looks something like this (rewritten to make sense
> without all the class definitions and other stuff going on)
>
> void WindowClass::on_treeview_row_activated(const Gtk::TreePath &path,
> Gtk::TreeViewColumn *column) {
> Gtk::TreeModel::iterator iter =
> treeview.get_model()->get_iter(const_cast<Gtk::TreePath&>(path));
>
> // *iter is then the activated Row
> }
>
> I know this is kind of messy, but I wrote the code I based that snippet
> on a long time ago and haven't touched it for some time. It's possible
> ti doesn't even work anymore, but it should be vaguely right.
it's working(atleast it compiles fine) .), but how do i get the content(ustring) from the iter/row,
i couldn't find any method to get it.
Andre Leubner
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]