TDMTextTarget on a frame

Home Forums DropMaster TDMTextTarget on a frame

Viewing 2 reply threads
  • Author
    Posts
    • #2860
      Patrick Snoeij
      Participant

        Hi,

        Currenty I’am using the TDMTextTarget components to facilitate drag and dropping of documents, outlook e-mails and attachments onto an panel.

        This is working correctly when the components are on the form.

        However when I use a frame on which the components are placed and implement the frame onto multiple forms; the it doesn’t allow files to be dropped onto the panel.

        The cursor doesn’t change to indicate it allows dropping.

        Can you help us further?

      • #2861
        DropMaster Support
        Participant

          If the acceptor control is on a frame, or a splitter, or if it’s e.g. a TListView and you change the view style at runtime, design-time hook-up of the drag and drop can fail at runtime. This kind of operation changes the window handle of the acceptor control which stops the drag and drop working (Windows drag and drop registration is by window handle).  In that kind of situation, you just do:

          DMTextTarget1.AcceptorControl := nil;  // needed to disconnect the drag and drop DMTextTarget1.AcceptorControl := theOriginalAcceptorControl; // reconnect the drag and drop.

          You can typically do this in the FormCreate event handler.

          Hope this helps.

        • #2865
          Patrick Snoeij
          Participant

            Thanks for the help. This fixed the problem.

        Viewing 2 reply threads
        • You must be logged in to reply to this topic.