RichTextBox 上下文菜单上的 IBeam 插入符号 [英] IBeam caret on contextmenu of RichTextBox

查看:26
本文介绍了RichTextBox 上下文菜单上的 IBeam 插入符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个上下文菜单并将其添加到富文本框.现在,当我右键单击富文本框时,会出现上下文菜单,但光标是 IBeam 插入符号而不是默认箭头.

I create a contextmenu and add this to a richtextbox. Now when I Right Click on the richtextbox, the contextmenu appears, but the cursors is an IBeam caret and not the default arrow.

有人知道如何解决这个问题吗?

Does anybody know how to fix this?

        var tb = new RichTextBox();
        tb.Text = "test";

        var items = new[] {new MenuItem("Save",SaveTextFile)};
        var ctxMenu = new ContextMenu(items);
        tb.ContextMenu = ctxMenu;

谢谢,

埃里克

推荐答案

我非常抱歉,但没有办法解决这个问题.长期以来,Winforms 一直是一个问题.请参阅此处这里.

I'm dreadfully sorry, but there is no way to fix this. It has been an issue with Winforms for a long time. See here and here.

微软承诺会调查它,但显然他们还没有修复它.

Microsoft promised to look into it, but apparently they haven't fixed it yet.

这篇关于RichTextBox 上下文菜单上的 IBeam 插入符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆