RE: GtkTreeView Callback Function

I also think you can use
        gint *myint;

        myint = gtk_tree_path_get_indices(path)
        row = myint[0];


-----Original Message-----
From: martyn 2 russell bt com [mailto:martyn 2 russell bt com]
Sent: 06 February 2003 21:03
To: NightSlayer gmx de; gtk-app-devel-list gnome org
Subject: RE: GtkTreeView Callback Function

You want to use gtk_tree_path_to_string().

This will tell you the EXACT index at each level (regardless 
to it being a
tree or a list).  Eg: if it was a list and the 5th item, it 
would return
"4".  If it was the 2nd down on the 3rd parent, it would be "2:1".

You can use arg1 for this (GtkTypeTreePath).


-----Original Message-----
From: Simon Fuhrmann [mailto:NightSlayer gmx de]
Sent: 06 February 2003 20:56
To: List Gtk App Devel
Subject: GtkTreeView Callback Function

Hi there!

I have a question related to the GtkTreeView in GTK 2. 

In a GtkListStore I have a list of filenames. And if a row gets
double-klicked (or "activated" in gtk words) I just want to know the
number of the row, for example the number `2' if the user clicks the
second row (or the third if counting starts at `0'). I have 
the following signal to receive information about a double click:

            void        user_function      (GtkTreeView *treeview,  
                                            GtkTreeViewColumn *arg2,
                                            gpointer user_data);

Now, how to get the number of the clicked row?


Simon Fuhrmann | NightSlayer gmx de |
All people talk about the real life, but where can i download it?
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

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]