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.
精彩评论