XBasic3000
XBasic3000

Reputation: 3486

How to disable Drag/drop TRichEdit or TRzRichEdit

How to block the drag and drop in TRichEdit? delphi code I work with Rich edit and having difficulties on blocking the drag and drop feature specially dragging text from outside the form let say comming from IE to my RichEdit.

Upvotes: 3

Views: 1487

Answers (2)

Sertac Akyuz
Sertac Akyuz

Reputation: 54802

See RevokeDragDrop on MSDN;

uses
  activex;

RevokeDragDrop(RichEdit1.Handle);

Upvotes: 3

simply_anny
simply_anny

Reputation: 79

try changing on key down/ up event setting it to readonly. onkey down, set it up to richedit1.readonly := false; and then on keyup richedit1.readonly := true; it works.. it evern disbled the paste features

Upvotes: 2

Related Questions