如何禁用拖放 TRichEdit 或 TRzRichEdit

发布于 2024-09-08 08:22:44 字数 92 浏览 4 评论 0原文

如何阻止 TRichEdit 中的拖放?德尔福代码 我使用 Rich edit,并且很难阻止拖放功能,特别是从表单外部拖动文本,比如说从 IE 到我的 RichEdit。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

盛夏尉蓝 2024-09-15 08:22:44

请参阅 MSDN 上的 RevokeDragDrop

uses
  activex;

RevokeDragDrop(RichEdit1.Handle);

See RevokeDragDrop on MSDN;

uses
  activex;

RevokeDragDrop(RichEdit1.Handle);
土豪我们做朋友吧 2024-09-15 08:22:44

尝试更改按键按下/按下事件,将其设置为只读。
onkey down,设置为 richedit1.readonly := false;然后在 keyup richedit1.readonly := true;它有效..它曾经禁用粘贴功能

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文