delphi – 如何避免StringGrid中的“Open IME”弹出窗口?
发布时间:2020-12-15 09:42:03 所属栏目:大数据 来源:网络整理
导读:在StringGrid中,有时当我右键单击时,我会在下面看到不需要的菜单.这是一个 Windows弹出窗口吗? 如何防止这个弹出窗口出现而不是我自己? 我在我的选项中有goAlwaysShowEditor. 我已将StringGrid.PopupMenu设置为我的弹出窗口. 我已设置StringGrid.OnMouseDo
在StringGrid中,有时当我右键单击时,我会在下面看到不需要的菜单.这是一个
Windows弹出窗口吗?
如何防止这个弹出窗口出现而不是我自己? 我在我的选项中有goAlwaysShowEditor. 我已将StringGrid.PopupMenu设置为我的弹出窗口. 我已设置StringGrid.OnMouseDown以显示我的弹出窗口,如果它是右键单击. 解决方法
您可以像这样覆盖虚拟CreateEditor方法(虽然不是一个好的解决方案,但我知道:-):
type TStringGrid = class(Grids.TStringGrid) protected function CreateEditor: TInplaceEdit; override; end; implementation function TStringGrid.CreateEditor: TInplaceEdit; begin Result := inherited CreateEditor; TMaskEdit(Result).PopupMenu := Form1.PopupMenu1; end; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |