ITabCellSearch.Direction

Syntax

Direction: TabCellSearchDirection;

Description

The Direction property determines the search direction.

Example

Executing the example requires a form with the Button1 button located on it, the UiTabSheet component named UiTabSheet1 and the TabSheetBox component. 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