I have a TControl descendant, non visual, in which I encapsulate drag
information. I override GetDragImages to return a TImageList with an
image in it. I call BeginDrag on the control. The drag happens, but no
image gets displayed.
I have tried playing with SetDragIndex, ShowDragImage and other
functions of TImageList, and scanned through how controls.pas hooks up
to the imagelist and control through a proxy object it creates. I've
looked through the included demos, the help files, and the several
Delphi tomes I have.
I could not find any example showing this functionality in use. Can
someone point me to a sample, or otherwise show how I add drag images to
my drag operations? This is for inside the app, not the global image
dragging such as used when dragging to the trashcan.
Delphi3.02. I have 4, but haven't ported the app to it yet.
--Bill Lee
remove '-junk' in address if you want to reply directly to me.
Regards,
Stuart
Bill Lee wrote in message <361B761E...@junk-qualcomm.com>...
But since *something* isn't working right with this process, I'll try
what you suggest.
First, the default processing never does a ShowDragImage, so that's part
of the problem. I was calling this on the ImageList directly during
processing of BeginDrag. Since other things are done to the ImageList
during drag startup, deferring this may be useful. I'll try handling it
in the first DragOver handler.
I also notice a control style, 'csDisplayDragImage'. This shows up in
the procedure DragTo, and seems to end ImageList dragging if the Target
doesn't have this control style set.
It looks like I have to add this control style to all controls that I
want to have the images show up over? Quite a pain, if so.
Confirmations? Comments?