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(ThesaurusDialog.DialogItem dialogItem);Public Function FindItem(dialogItem As ThesaurusDialog.DialogItem) As ControlParameters
| Parameter | Description |
|---|---|
| dialogItem | The name of the requested control represented by an enum of type ThesaurusDialog.DialogItem. |
Return Value
The requested control if found. Otherwise null.
Examples
The following example removes the 'Back' button from the ThesaurusDialog object:
Control ctrl = dlg.FindItem(TXTextControl.ThesaurusDialog.DialogItem.TXITEM_BackButton);
ctrl.Parent.Controls.Remove(ctrl);Dim ctrl As Control = dlg.FindItem(TXTextControl.ThesaurusDialog.DialogItem.TXITEM_BackButton)
ctrl.Parent.Controls.Remove(ctrl)The following example finds a matching item in the thesaurus dialog.
System.Windows.Forms.Control result = thesaurusDialog.FindItem(ThesaurusDialog.DialogItem.TXITEM_FindSynonymsLabel);
result?.Select();Dim result As System.Windows.Forms.Control = thesaurusDialog.FindItem(ThesaurusDialog.DialogItem.TXITEM_FindSynonymsLabel)
If result IsNot Nothing Then result.Select()