开发者

How do I change what appears when right clicking in a rich text box in C#?

So in a rich text box (in Visual C#.NET) when I highlight some text and then right click with my mouse nothing happens.

How do I make that little right click window pop up? How do I set the options for it?开发者_如何学编程


     ContextMenu contextMenu = 
        new System.Windows.Forms.ContextMenu (
           new [] {
             new MenuItem ("Entry1", ContextMenuItem_Click),
             new MenuItem ("Copy", ContextMenuItem_Click)
           });
     RichTextBox rtb = 
       new RichTextBox
         {
            Size = ClientSize,
            Parent = this,
            ContextMenu = contextMenu
         };
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜