|
|
| Author |
Message |
|
|
Damage92 Familiar Face
Joined: 05 Aug 2009 Posts: 18
|
Posted: Sun Mar 07, 2010 10:35 am Post subject: How to drag and drop row into treeview |
|
|
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
|
Posted: Wed Mar 10, 2010 7:57 pm Post subject: |
|
|
| Why drag-drop signal don't finish drag-drop on treeview? :'( |
|
| Back to top |
|
 |
Damage92 Familiar Face
Joined: 05 Aug 2009 Posts: 18
|
Posted: Fri Mar 12, 2010 4:40 pm Post subject: |
|
|
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 |
|
 |
|