[Gtk-sharp-list] Problem with drag and drop in a reorderable TreeView

David Cantin david_cantin at videotron.ca
Wed Mar 26 09:34:35 EDT 2008


Hi (this is a re-post, the first one didn't reach the list..)

I want a TreeView to be always ordered and also allow the user to move
rows from a "folder" to an other.

The problem is : 

	- If I set a TreeSortable.DefaultSortFunc, it seem that the TreeView is
not accepting drop's anymore.

Are TreeSortable.DefaultSortFunc and TreeView.Reorderable attribute
incompatible ?

I have attached an example that show what I'm trying to do.

### use case 1 with the two lines commented (see attached the file): 

	1) With the mouse, drag and drop the row named "Item 4" directly (not
just before or just after) on "Group 2"

Expected results :

	- The row "Item 4" is now under "Group 2" and correctly ordered between
"Item 1" and "Item 5"

Actual result : 

	- The row "Item 4" is now the top most row in "Group 2"


### use case with the two lines uncommented (see attached the file): 

	1) With the mouse, drag and drop the row named "Item 4" directly (not
just before or just after) on "Group 2"

Expected results :

	- The row "Item 4" is now under "Group 2" and correctly ordered between
"Item 1" and "Item 5"

Actual result : 

	- The drop seem to be refused the dragged row stay at the original
position in "Group 1"



David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SampleTreeView.cs
Type: text/x-csharp
Size: 1377 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080326/d59fbc78/attachment.bin 


More information about the Gtk-sharp-list mailing list