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(BookmarkDialog.DialogItem dialogItem);Public Function FindItem(dialogItem As BookmarkDialog.DialogItem) As ControlParameters
| Parameter | Description |
|---|---|
| dialogItem | The name of the requested control represented by an enum of type BookmarkDialog.DialogItem. |
Return Value
The requested control if found. Otherwise null.
Examples
The following example removes the 'Can be deleted during editing' check box from the BookmarkDialog object:
Control ctrl = dlg.FindItem(TXTextControl.BookmarkDialog.DialogItem.TXITEM_Deletable);
ctrl.Parent.Controls.Remove(ctrl);Dim ctrl As Control = dlg.FindItem(TXTextControl.BookmarkDialog.DialogItem.TXITEM_Deletable)
ctrl.Parent.Controls.Remove(ctrl)The following example finds a matching item in the bookmark dialog.
System.Windows.Forms.Control result = bookmarkDialog.FindItem(BookmarkDialog.DialogItem.TXITEM_BookmarkNameLabel);
result?.Select();Dim result As System.Windows.Forms.Control = bookmarkDialog.FindItem(BookmarkDialog.DialogItem.TXITEM_BookmarkNameLabel)
If result IsNot Nothing Then result.Select()