GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to drag and drop row into treeview

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
Damage92
Familiar Face


Joined: 05 Aug 2009
Posts: 18

PostPosted: Sun Mar 07, 2010 10:35 am    Post subject: How to drag and drop row into treeview Reply with quote

Where can I find a simply tutorial about drag and drop into treeview?
I tried to use some functions and signals, but don't work :'(
Thank :)
Back to top
Damage92
Familiar Face


Joined: 05 Aug 2009
Posts: 18

PostPosted: Wed Mar 10, 2010 7:57 pm    Post subject: Reply with quote

Why drag-drop signal don't finish drag-drop on treeview? :'(
Back to top
Damage92
Familiar Face


Joined: 05 Aug 2009
Posts: 18

PostPosted: Fri Mar 12, 2010 4:40 pm    Post subject: Reply with quote

I did it!
I used "drag-begin" signal on treeview to write dropped row's number in a global variable.
Then, I used "row-inserted" signal on treeview model (liststore in my case) to execute code after drag-and-drop. But this g_signal_connect must stay after treemodel's initialization.
In this code I can read source row's number, and read end row's number using treepath passed by g_signal_connect (gtk_tree_path_get_indices).
I'm not sure if is correct, but for now it works :)
bye!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP