Re: Re: Q: How to get selected tree iter's index?
- From: "Shorn Mo / Partner Tech.(Shanghai) Co., Ltd." <shorn_mo partnertech com cn>
- To: <gtk-app-devel-list gnome org>
- Subject: Re: Re: Q: How to get selected tree iter's index?
- Date: Wed, 12 Nov 2003 09:21:45 +0800
thx, I have understood indices. It is a serial of index no for each level.
Fortunately, I need just only ONE level, so I use simply
//...
idx=*indices;
you want the path indices, or, more precisely, something like this:
gint depth, *indices, idx;
depth = gtk_tree_path_get_depth(path);
indices = gtk_tree_path_get_indices(path);
g_assert(depth > 0); /* depth 0 = invisible root of the tree view */
idx = indices[depth-1];
That gives you the 'n' as in 'the n-th child of the parent node' that this
row
is (if that's what you wanted).
Cheers
-Tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]