Draggging dropping components


Is it possible to change the behavior of selecting and then dragging blocks from a diagram object library onto the diagram canvas while keeping the mouse pressed, and changing the cursor to the icon bmp of the block selected. 
(This instead of clicking the icon in the library, releasing the mouse button and then clicking again where you want to have the block inserted; as it works now)?

This would more be more like many standard software tools operate, where items are selected from libraries and dragged onto a canvas.

I guess it would mean to adapt some event handlers and change the cursor bitmap (or even draw the icon bitmap while dragging onto the diagram canvas.

Any hints are appreciated.

Thanks, Wilfried

Hi Wilfried, unfortunately such behavior is not currently possible. 

Yes, I understand not in the current implementation. But do you think it is doable by adapting the current code? 
Will it work still with TCategoryButtons solution for the block libraries? or better use something else? After all: in the Delphi IDE it works as we like when dragging components from the component palette.

It would need changing TMS Diagram Studio source code. It has to be investigated, it's not trivial as there is a need to handle the mouse move, the block position, etc.. It cannot be done without changing the component source code itself, unfortunately.

I understand that. And I understand it is possible. I think I need to change DrgButton.pas: set TDiagramButtons.DragMode to dmAutomatic and then some how intercept the event handlers correctly.
I was just hoping to get some hints where to look at and what units to change....

I managed to get it working quite nicely by adapting the atdiagram.pas and dgrbuttons.pas code. It now works both the old way (click to select and click in diagram) and in a drag-and-drop fashion, with also the TCategoryButton icon and name dragged along semi-transparantly with the cursor.
All in all it was not such a very big deal after all. But important for our app so that justified the effort.
cheers, Wilfried