DropMaster Support

Forum Replies Created

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • in reply to: Not Sure How to Do This. #449
    DropMaster Support
    Participant

      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 a MouseButton property so the components know when to process a drop, and you can detect a drag with a non-standard button using the WinAPI DragDetectEx() instead of DragDetect(). Take a look at the Demos\Delphi\Feedback\MouseButton.dpr project and/or search for DragDetect() 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 the TDMTextSource.Text property just before calling TDMTextSource.Execute, or use a custom format instead of text. For the latter, see the Demos\Delphi\CustomFormats folder for examples.

      in reply to: PDF Page Drag #425
      DropMaster Support
      Participant

        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.

      Viewing 2 posts - 16 through 17 (of 17 total)