FindItem Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWindows. Forms. dll
Description
Finds a control that has the provided identifier name.
Syntax
public Control FindItem(GotoDialog.DialogItem dialogItem);Public Function FindItem(dialogItem As GotoDialog.DialogItem) As ControlParameters
| Parameter | Description |
|---|---|
| dialogItem | The name of the requested control represented by an enum of type GotoDialog.DialogItem. |
Return Value
The requested control if found. Otherwise null.
Examples
The following example removes the 'Table' item from the GotoDialog's 'Go to what' list:
ListBox ctrl = (ListBox)dlg.FindItem(TXTextControl.GotoDialog.DialogItem.TXITEM_GotoList);
ctrl.Items.RemoveAt(3);Dim ctrl As ListBox = DirectCast(dlg.FindItem(TXTextControl.GotoDialog.DialogItem.TXITEM_GotoList), ListBox)
ctrl.Items.RemoveAt(3)The following example finds a matching item in the goto dialog.
System.Windows.Forms.Control result = gotoDialog.FindItem(GotoDialog.DialogItem.TXITEM_GotoLabel);
result?.Select();Dim result As System.Windows.Forms.Control = gotoDialog.FindItem(GotoDialog.DialogItem.TXITEM_GotoLabel)
If result IsNot Nothing Then result.Select()