Re: how to browse values from a GtkListStore ?



Hello.

Is possible to browse them with an index ?

What is an index?

You can use gtk_tree_mogel_get_iter() to get an iter corresponding to
given position in the tree (as represented by GtkTreePath).

You can iterate using gtk_tree_iter_first()/gtk_tree_iter_next().

If index is mean as a row number, than you can directly access it
using a code like this:

---- CODE ----
GtkTreePath *path;
GtkTreeIter iter;

path = gtk_tree_path_new_from_indices( index, -1 );
gtk_tree_model_get_iter( model, &iter, path );
gtk_tree_path_free( path );
---- CODE ----

Tadej

-- 
Tadej BorovÅak
tadeboro.blogspot.com
tadeboro gmail com
tadej borovsak gmail com



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