Recent

Author Topic: How to DragImageList? Alternatives to PainTo?  (Read 5278 times)

Shebuka

  • Sr. Member
  • ****
  • Posts: 422
How to DragImageList? Alternatives to PainTo?
« on: November 23, 2011, 06:43:26 pm »
Hi all, i have followed the tutorial article by Brian and now it's like 3 hours that i'm trying to make the drag with enchanted image to work (i'v even tested it on windows and it works) until i start to debug inside he core of widget and discover that whole thing about TCarbonWSDragImageList is empty... and it fallback in TWSDragImageList wich returns always false...

Is there plans to develop this functionality on Mac OS X, is there any obstacles to develop it and what alternative I have to simulate DragImageList behavior?
« Last Edit: November 29, 2011, 09:55:49 am by Shebuka »

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: How to DragImageList? Alternatives?
« Reply #1 on: November 24, 2011, 11:31:58 am »
I run into same trouble with Darwin. A solution is to apply Qt which can handle TDragImageList. But Qt works not well in some other areas, e.g. there is no OpenGL binding for Qt and installation as well as deployment is not intuitive.
Lazarus 1.7 (SVN) FPC 3.0.0

Shebuka

  • Sr. Member
  • ****
  • Posts: 422
Re: How to DragImageList? Alternatives?
« Reply #2 on: November 24, 2011, 12:27:15 pm »
I run into same trouble with Darwin. A solution is to apply Qt which can handle TDragImageList. But Qt works not well in some other areas, e.g. there is no OpenGL binding for Qt and installation as well as deployment is not intuitive.
I need to use Carbon...

But i'v found a temporary solution, i create a form with enabled alphablending and set it to 0, (i can't show/hide because it mess with focus wich cause sometimes to not send a drop message) then on drag start set alphablending to 200 and activate a timer that every 50 ms moves form next to cursor position. On drag stop i set alphablending again to 0 and stop the timer. A bit hardcore solution...

Shebuka

  • Sr. Member
  • ****
  • Posts: 422
Re: How to DragImageList? Alternatives?
« Reply #3 on: November 28, 2011, 04:10:10 pm »
Hi all,
I'm a bit stuck on a problem, Brian example use the PainTo method that works on Windows, but not on Carbon. What can i do to copy the canvas from a Panel to my Form's canvas?

Shebuka

  • Sr. Member
  • ****
  • Posts: 422
Re: How to DragImageList? Alternatives to PainTo?
« Reply #4 on: March 12, 2013, 03:46:16 pm »
Hi all,
i'm back to fix some issues with my app and need to figure out two things:
1. how to make desktop/any_other_app a valid drag&drop target so that cursor become "green"? (currently i'm detecting the drop on desktop with (Target = nil) and (X <> 0) and (Y <> 0)) in OnEndDrag procedure)
2. how to make form not be messaged with OnDragOver but pass the message to next form under mouse position? (i must move the form with drag image under cursor, so it eats all OnDragOver messages and i can't recognize where i'm dropping... attached image)