Reply To: TDMTextTarget on a frame

Home Forums DropMaster TDMTextTarget on a frame Reply To: TDMTextTarget on a frame

#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.