Create a Context Menu and Attach it to a Control
To create context menu and associate it with a control at design time
1. Add C1Menu control to your page.
2. Add a Textbox control to your page.
3. Right-click on C1Menu and select Edit Menu. The C1Menu Designer Form appears.
4. Add three link menu items and name them cut, copy, and paste.
5. Select C1Menu1 in the menu tree and set the ContextMenu property to True and the ContextElementID to TextBox1.
Setting the ContextElementID to TextBox1 associates the C1Menu control with the TextBox control.
6. Run your project. Right-click on the TextBox control. The context menu appears.
|