Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TreeCtrl » Drag&drop example bug and questions
Drag&drop example bug and questions [message #49349] Tue, 30 January 2018 14:21 Go to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Hi!

I've never done D&D drop before, in U++ or otherwise, but I would like to have D&D file move in a TreeCtrl.

The best sample I could find in U++ was reference/DragAndDrop.

Now, first of all, when dragging from the same instance of the app, the second drop will ASSERT. This should be fixed. It doesn't assert when using two different instaces of the app.

Beyond that, there are a few things I would like to figure out:
1. How to limit D&D to a single instance of the app and preferably to a single TreeCtrl.
2. How to disable reordering of items. The TreeCtrl is a folder tree. I want to drag from one folder and drop in another folder: a rename/move. Reordering in the same parent node is not an operation that makes sense. I can ignore this but it would be great if I could fine tune when the little line that shows drop position shows up.
3. Are all D&D operations done through PasteClip?

Thank you!

Re: Drag&drop example bug and questions [message #49352 is a reply to message #49349] Tue, 30 January 2018 16:26 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Second bug/weird feature: d.Accept(MyDnDName) will set the data for "d" to the correct string + exactly 4 '\0' characters.

Needless to say this messes up all hash searches.
Re: Drag&drop example bug and questions [message #49411 is a reply to message #49352] Tue, 06 February 2018 11:57 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
cbpporter wrote on Tue, 30 January 2018 16:26
Second bug/weird feature: d.Accept(MyDnDName) will set the data for "d" to the correct string + exactly 4 '\0' characters.

Needless to say this messes up all hash searches.


Actually, that is the reason why it did crash (with some more problems in GetTextSize).

The example should be now fixed. The moral of the story is that PasteClip can return zero padded data.

Example now fixed in trunk.

1. you have control over that format ID. Use it Smile Also investigate InternalClip etc

2. You do not need to Insert at the position it suggests. E.g. get parent node and add to it.

3. Yes.
Previous Topic: how to wake up TreeCtrl
Next Topic: off by 1 dynamic tree with sql: SOLVED
Goto Forum:
  


Current Time: Fri Apr 19 17:43:04 CEST 2024

Total time taken to generate the page: 0.03739 seconds