ITabCellSearch.Range

Syntax

Range: ITabRange;

Description

The Range property determines a range, in which search should be performed.

Example

To execute the example a form with a button on this form named "Button1", the component UiTabSheet named UiTabSheet1 and the component TabSheetBox are required. 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.Text := "123";
    CellSearch.Range := Tab.Cells(0,0,5,5);
    Result := CellSearch.Execute;
    If Result <> Null Then
        i := Result.CurrentRow;
        j := Result.CurrentColumn;
    End If;
End Sub Button1OnClick;

Clicking the button starts search for the "123" value in the cells. The search is performed within the range A0:F5. If the search is successful the i variable will contain the number of the row and the j variable will contain the number of the column of the found cell.

See also:

ITabCellSearch