Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing image when dragging

Status
Not open for further replies.

Nordlund

Programmer
Jul 17, 2001
458
SE
Hi.
I'm trying to perform professional drag and drop, but I have runned into problems.

I have managed to use images instead of cursors when dragging, but I want to be able to change the dragging image on the fly... If I pass a forbidden panel, i want to show a stop sign, but when I pass a dropable panel I want to show a greenlight instead.

How do I proceed.
(I used this page for base of my dragging:
[tt]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not underestimate the power of [!]Google[/!][/tt]
 
I think that the solution is already given in that link?

see chapter "VCL Custom Drag Images"

/Daddy



-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
I read this chapter, but what I can see it does only cover the on-the-fly changes with use of Cursor, not Images (TBitmap).

I'll read it deeper again now... :)

[tt]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not underestimate the power of [!]Google[/!][/tt]
 
The overridden function GetDragImages which sets the image fires only on "OnStartDrag", not on "OnDragOver"

[tt]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not underestimate the power of [!]Google[/!][/tt]
 
ok, will check this out (will be this evening)

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Have you done some research yet?

[tt]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not underestimate the power of [!]Google[/!][/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top