[Lazarus] Drag (and show) images
donald at ziesig.org
Fri Apr 13 02:40:57 CEST 2018
On 04/11/2018 07:18 PM, Werner Pamler via Lazarus wrote:
> 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?
You're right. It gets *close* but not quite there. I can move the
control so long as the mouse is *not* over the control while it is
moving :-(. I will look at this closer in the morning and see if I can
work around it (or if there is something I am missing).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus