TX Text Control .NET for Windows Forms

FindItem Method

Method|Introduced in 23.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Finds a control that has the provided identifier name.

Syntax

public Control FindItem(DeleteBookmarksDialog.DialogItem dialogItem);

Parameters

ParameterDescription
dialogItem

The name of the requested control represented by an enum of type DeleteBookmarksDialog.DialogItem.

Return Value

The requested control if found. Otherwise null.

Examples

The following example removes the 'Go To' button from the DeleteBookmarksDialog object:

Control ctrl = dlg.FindItem(TXTextControl.DeleteBookmarksDialog.DialogItem.TXITEM_GotoBookmark);
ctrl.Parent.Controls.Remove(ctrl);

The following example finds a matching item in the delete bookmarks dialog.

System.Windows.Forms.Control result = deleteBookmarksDialog.FindItem(DeleteBookmarksDialog.DialogItem.TXITEM_BookmarkListLabel);
result?.Select();