Re:Re: problem about node of treeview

thanks very much

At 2011-11-02 22:46:42,"Dong Luo" <us917 yahoo com> wrote:

I assume the "GtkTreePath *path" is the row where double click happened. You can easily determine if it's a 
top node or not in your callback function, just do nothing if it is.
From the on-line reference:

"A path is essentially a potential node. It is a location on a model that may or may not actually correspond 
to a node on a specific model. TheGtkTreePath struct can be converted into either an array of unsigned 
integers or a string. The string form is a list of numbers separated by a colon. Each number refers to the 
offset at that level. Thus, the pathâ0â refers to the root node and the pathâ2:4â refers to the fifth child 
of the third node."
Use to convert a path to a 
Or, you can use to get 
the iter for top node and compare with the double clicked iter to see if it's the same one.


From: wang yi feng <renlei447 126 com>
To:gtk-app-devel-list gnome org
Sent: Wednesday, November 2, 2011 8:38 AM
Subject: problem about node of treeview

Recently,I  am working on a configuration for an graphical application,which contains strings 
,pixbuf(image).When I add double click function for the node ,it's can work.But  the top node in response to 
"double click" too.How can I set the top node insensitive.See the function "void view_onRowActivated 
(GtkTreeView *treeview,GtkTreePath *path,GtkTreeViewColumn *col,gpointer userdata)" in the attachment.
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

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