TextContextMenu Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWindows. Forms. dll
Description
Gets or sets the context menu, which will be shown. The items depend on the document location where the mouse click occurs. The menu can be altered, extended or completely replaced. When this property is set to null, the TextControl uses system menu items. To completely suppress a context menu, the Cancel Property must be set the true.
Syntax
public ContextMenuStrip TextContextMenu { get; set; }Public Property TextContextMenu As ContextMenuStripExamples
The following example uses TextContextMenuEventArgs.TextContextMenu while handling TextContextMenuOpening.
textControl.TextContextMenuOpening += (_, e) =>
{
e.TextContextMenu?.Select();
};AddHandler textControl.TextContextMenuOpening,
Sub(sender, e)
If e.TextContextMenu IsNot Nothing Then e.TextContextMenu.Select()
End Sub