[Lazarus] Drag (and show) images

Werner Pamler werner.pamler at freenet.de
Thu Apr 12 01:18:39 CEST 2018


Am 12.04.2018 um 00:02 schrieb Donald Ziesig via Lazarus:
> I am trying to write an app that allows me to drag images and show 
> them while they are being dragged (like the cards in Solitaire).
>
> I have been able to drag images (showing only the drag cursor) and 
> drop them appropriately, but I haven't been able to find any recent 
> documentation showing the use of TDragImageList and TDragObject.
>
> The only articles that I have found are for Delphi from 2011 (which 
> translates to Lazarus but doesn't work correctly) and some more recent 
> that don't show the dragged image while the drag is taking place (I 
> have that part working).
>
> I was able to show a dragged image by adding code to the DragOver 
> event, but that seems to take more time than it should.
>
> Can anyone point me in the right direction for this?

There is a sample in folder examples/dragimagelist of your Lazarus 
installation - maybe it gets close to what you need?


More information about the Lazarus mailing list