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