[6.0.0.13] OnDragnDropFromControl Event not called

Started by stephan_35, November 20, 2009, 03:08:48 AM

Previous topic - Next topic

stephan_35

Hello,

With 6.0.0.13 OnDragnDropFromControl is not called on event.

Thanks
Best regards
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

owenwengerd

I could not reproduce this. Can you attach a saimple example?
Owen Wengerd (Outside The Box) / ManuSoft

stephan_35

I needed to set keepFocus on it !
And all controls are set to asynchronous.

I saw the difference between 6.0.0.3 to 6.0.0.13, because my tools can't work as it should !

Too much trouble with this treeview !  ;)

Thanks for your job.
Best regards.
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

Fred Tomke

#3
Quote from: owenwengerd on November 20, 2009, 08:30:55 AM
I could not reproduce this. Can you attach a saimple example?

Hi Owen,

DragnDropFromControl returns a list instead of a key as string. If it should be a a 2D-point in future there should be a HitPointTest, too.

Fred

[EDIT] Added as bug report: https://sourceforge.net/tracker/?func=detail&aid=2901395&group_id=187950&atid=923363
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

stephan_35

#4
Quote from: Fred Tomke on November 20, 2009, 12:17:52 PM
DragnDropFromControl returns a list instead of a key as string. If it should be a a 2D-point in future there should be a HitPointTest, too.

Hi Fred,

Do you have meet this trouble about DragnDropFromCrontrol event not called with 6.0.0.13 in treeview ?

Thanks
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

Fred Tomke

No, stephan, DragnDropFromCrontrol will be called in my forms. But I have other several problems with it.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

stephan_35

To Owen.
If it can help you, i can try every runtime and tell you from wich one dragndropfromcontrol event disapear .
Best regards

OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

owenwengerd

Stephan, a simple example is most useful in this case. I will take a look at the files you attached.
Owen Wengerd (Outside The Box) / ManuSoft

owenwengerd

Stephan, your test project seems to be working for me. Please test again in Alpha 14. It's possible that fixing the bug that Fred reported also affected your issue.
Owen Wengerd (Outside The Box) / ManuSoft

stephan_35

Quote from: owenwengerd on November 22, 2009, 04:01:38 PM
Stephan, your test project seems to be working for me. Please test again in Alpha 14. It's possible that fixing the bug that Fred reported also affected your issue.

Hello Owen,

Yes, with version 6.0.0.14 Event DragnDropFromControl is called.

However a new incident occurs:
The shift and control keys are not activated during the movement of a node.

If you wish, you can send me corrections by email to validate the tests.

Thank you.

Best regards.
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

owenwengerd

Stephan, the fix I made for Fred was to force the drag to be a 'copy' when the OnDragnDropBegin event handler is defined. I thought this is what both of you wanted.
Owen Wengerd (Outside The Box) / ManuSoft

stephan_35

Quote from: owenwengerd on November 23, 2009, 08:09:28 AM
Stephan, the fix I made for Fred was to force the drag to be a 'copy' when the OnDragnDropBegin event handler is defined. I thought this is what both of you wanted.

good evening,

No, not at all, Instead I've never asked for this change!
it is sad to not be able to move nodes within a treeview.
This would condemn me to use only the version 6.0.0.3 which is functional.

What was annoying was that he did not master the difference between the two actions

This problem is solved as follows: I am testing on the selected node, so there is that the action is a copy, if it disappears, is that the action is shifting.

All this works through a combination of different events listed in the screenshot above.



Thank you

Best regards.
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

owenwengerd

I can easily change it back. Hopefully Fred can describe his needs, or what has changed since earlier versions, so that I can come up with a solution that doesn't affect your code.
Owen Wengerd (Outside The Box) / ManuSoft

stephan_35

#13
Quote from: owenwengerd on November 23, 2009, 09:57:53 AM
I can easily change it back. Hopefully Fred can describe his needs, or what has changed since earlier versions, so that I can come up with a solution that doesn't affect your code.

Good evening,

I'm glad to hear that this choice is not final!

If I can help Fred by any means I am present, even if only to describe how I adopted.

From my side it must find a way to restart the Shift and Ctrl keys that determine the movement or copying of nodes, not least as an option, which would meet both our cases!

I return in detail the problems encountered to date with the movement of nodes:

Consider KeepFocus.
Determine the current action: Move or Copy?
The selected node before DragNDrop.
Rehabilitate the tree if the action requested by the user is not authorized, is a big problem with moving node. I can detail if you wish. But the best solution is, in my opinion, can intervene in the action during the overflight of nodes (Forbidden / Allowed / Copy / Move).
For the reconstruction of nodes (tree), I found an interim solution, pending which I do not like.

To conclude it all, I am not able to distribute a demonstration program, but I can make you a video that might be more meaningful than the long text?

Thank you for everything.
Best regards.
(hope that google translate all correctly )
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

Fred Tomke

Hello,

I need it as it was in earlier releases (5.x) and in ObjectDCL: I need full control of the tree when DragDrop begins and when DragDrop ends.
Until now it was defined that an item was automatically moved when the events are not activated. That is a really pragmatic solution. Owen told me that the Move-method is active if no Ctrl-key is pressed. If the user moves an item by holding Ctrl-key the item will be copied. This is consistent to Windows explorer.

What happens in my code if drag and drop is starting at tree? Most of my code changes databases (Access, MySQL and AcDbDictionaries and AcDbXrecords). Some nodes are not allowed to be moved. Some items are not to be allowed to be a dragdrop destinations. I have to control it by myself to make sure that only legal changes are made. It's the only way to work with Drag&Drop in trees for me.

An example:
There is a layertheme manager to take control of the drawing order. In the root there are all layer themes listed. Under the layer themes there are all layer groups listed and optional dwg-underlays (xref). The user can move all the layergroups of one layertheme within the layertheme as I want. But the user cannot

  • move a layergroup in the root between two layerthemes, because a layergroup can only be a child of a layertheme,
  • move a layergroup into a xref because no layergroup cannot be part of a xref,
  • move a layergroup between layerthemes because a layergroup (with its contained layers) can only be a child of a single layertheme

I see no problem if an additional property would be introduced for Drag&Drop control style. But there must be a chance to get full control to avoid unauthorized actions in a tree.
This is only one example. I could give much more.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]