Delphi 禁用TEdit右键菜单及复制粘贴简单的方法

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;

posted @ 2021-12-16 15:12  myrj  阅读(192)  评论(0编辑  收藏  举报