3

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?

Alper
  • 1
  • 12
  • 39
  • 78
  • @agent-j yeah, I think... that's what opens when you highlight text and right click in any other text editor, right? – Alper Jun 18 '11 at 00:40

1 Answers1

2
     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
         };
agent-j
  • 27,335
  • 5
  • 52
  • 79