ITabCellSearch.Direction

Syntax

Direction: TabCellSearchDirection;

Description

The Direction property determines the search direction.

Example

To execute the example a form with a button on this form named Button1, a component UiTabSheet named UiTabSheet1 and a component TabSheetBox are required. The UiTabSheet1 is a data source for the TabSheetBox component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    TSheet: ITabSheet;
    CellSearch: ITabCellSearch;
    Result: ITabSearchResult;
    i, j: Integer;
Begin
    TSheet := UiTabSheet1.TabSheet;
    CellSearch := TSheet.CreateCellSearch;
    CellSearch.Direction := TabCellSearchDirection.Columns;
    CellSearch.Text := "DATA";
    CellSearch.CaseSensitive := True;
    Result := CellSearch.Execute;
    If Result <> Null Then
        i := Result.CurrentRow;
        j := Result.CurrentColumn;
    End If;
End Sub Button1OnClick;

Clicking this button starts case sensitive search for the DATA value. After the search has been performed, the variable i contains the row number, and the variable j contains the column number of the obtained cell. Search is to be performed by columns.

See also:

ITabCellSearch