Re: how to browse values from a GtkListStore ?
- From: Tadej BorovÅak <tadeboro gmail com>
- To: David NeÄas <yeti physics muni cz>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: how to browse values from a GtkListStore ?
- Date: Sun, 15 Nov 2009 11:00:03 +0100
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]