Click or drag to resize

IFieldListFindFieldWithText Method

Finds a field by position that contains the specified text.

Namespace:  MicroFocus.ZFE.Connector
Assembly:  MicroFocus.ZFE.Connector (in MicroFocus.ZFE.Connector.dll) Version: 1.3.379.0 (1.3.379.0)
IField FindFieldWithText(
	string text,
	IPosition startPosition,
	SearchDirection direction


Type: SystemString
The text to match.
Type: MicroFocus.ZFE.ConnectorIPosition
The position at which to start the search.
Type: MicroFocus.ZFE.ConnectorSearchDirection
The direction in which to search.

Return Value

Type: IField
The field that matches the specified text or null if no field is found.
When searching backwards, the search will not wrap to the bottom of the screen.
Visual Basic for Applications:
Dim ps As PresentationSpace
Dim field As Field
Dim fieldList As FieldList
Dim pos As Position

Set ps = mySession.PresentationSpace
Set fieldList = ps.Fields
Set pos = New Position

pos.Row = 22
pos.Column = 1

Set field = fieldList.FindFieldWithText("Option", pos, SearchDirection.Forward)
If Not field Is Nothing Then
    ... use field object ...
End If
IPresentationSpace ps;
IField field;
IFieldList fieldList;
IPosition pos;

ps = mySession.PresentationSpace
fieldList = ps.Fields
pos = new Position { Row = 22; Column = 1; }

field = fieldList.FindFieldWithText("Option", pos, SearchDirection.Forward)
if (field != null)
    ... use field object ...
See Also