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.4.444.0 (1.4.444.0)
Syntax
IField FindFieldWithText(
	string text,
	IPosition startPosition,
	SearchDirection direction
)

Parameters

text
Type: SystemString
The text to match.
startPosition
Type: MicroFocus.ZFE.ConnectorIPosition
The position at which to start the search.
direction
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.
Remarks
When searching backwards, the search will not wrap to the bottom of the screen.
Examples
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
C#:
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