Forum Replies Created
-
AuthorPosts
-
Glad you got things working the way you like. I’m creating a reply below anyway for future reference in case anyone else has similar questions.
Buttons and dragging. There are lots of different possibilities for starting a drag.
TDMTextSource
has aMouseButton
property so the components know when to process a drop, and you can detect a drag with a non-standard button using the WinAPIDragDetectEx()
instead ofDragDetect()
. Take a look at the Demos\Delphi\Feedback\MouseButton.dpr project and/or search forDragDetect()
in the Demos folder to see examples.Shift key. You can detect whether the shift key is down when you’re detecting a drag by calling the WinAPI like
aShiftKeyIsDown := GetAsyncKeyState(VK_LSHIFT) or GetAsyncKeyState(VK_RSHIFT);
which will be true if either the left or right shift key is down at the moment the function is called.In terms of adding the extra data to a drag, you can either forgo the
DonorComponent
assignment and directly assign the desired content to theTDMTextSource.Text
property just before callingTDMTextSource.Execute
, or use a custom format instead of text. For the latter, see the Demos\Delphi\CustomFormats folder for examples.- This reply was modified 6 years ago by DropMaster Support.
- This reply was modified 6 years ago by DropMaster Support.
That depends on the PDF viewer software you use. If your PDF viewer allows dragging a page then there ought to be a way to accept it in DropMaster. My advice is to build the FormatViewer demo that comes with DropMaster and see what happens if you attempt a drop into it. FormatViewer should list every data format present in a drag and it is the primary tool you need for figuring out how to use a new/non-standard drop source.
Hope this helps.
-
AuthorPosts