本文整理自网络,侵删。
Delphi 禁用TEdit右键菜单及复制粘贴简的单方法如下:
1) 设置TEdit的ReadOnly 属性为True
Edit1.ReadOnly := True;
2) 在TEdit的OnContextPopup中使Handled := True
procedure TFrmReport.Edit1ContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
begin
Handled := True;
end;
相关阅读 >>
Delphi unigui unistringgrid1 清空
Delphi 10.4中新增功能:新的vcl tedgebrowser组件
Delphi (user agent) of a twebbrowser
Delphi adoconnection1 连接excel 读取数据
更多相关阅读请进入《Delphi》频道 >>