How to change what appears when you right-click in a rich text box in C #?

So, in the extended text box (in Visual C # .NET), when I select some text and then right-click, nothing happens.

How can I make this small right click window? How to set parameters for it?

+3
source share
1 answer
     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
         };
+2
source

All Articles