Re: Get tree_path from iter
- From: "Padraig O'Briain" <Padraig Obriain Sun COM>
- To: Markus Fischer <markus fischer name>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Get tree_path from iter
- Date: Tue, 24 May 2005 09:30:11 +0100
Markus Fischer wrote:
Hi,
I'm adding items to a tree like this (simplified):
while (data->next()) {
new_iter = model_append(parent_iter, data);
}
at some point there's a row appended I need for later usage, I do this:
while (data->next()) {
new_iter = model_append(parent_iter, data);
if (data->compare("I need this later")) {
remember_iter = new_iter;
}
}
When changing the model has finished, I want to set the cursor on this
specific row. Thanks to the tree tutorial [1,2] I found out I need to
call gtk_tree_view_set_cursor [3]. However this function needs a path
and for the time I cannot work out how to get a path from the iter.
Try gtk_tree_model_get_path
thanks,
- Markus
[1] http://scentric.net/tutorial/treeview-tutorial.html
[2]
http://scentric.net/tutorial/sec-editable-cells.html#sec-editable-cells-text-set
[3]
http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeView.html#gtk-tree-view-set-cursor
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]