开发者

IBeam caret on contextmenu of RichTextBox

开发者 https://www.devze.com 2023-03-31 16:30 出处:网络
I create a contextmenu and add this to a richtext开发者_StackOverflow中文版box. Now when I Right Click on the richtextbox, the contextmenu appears, but the cursors is an IBeam caret and not the defaul

I create a contextmenu and add this to a richtext开发者_StackOverflow中文版box. 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;

Thanks,

Erik


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消