Range: ITabRange;
The Range property determines a range, in which search should be performed.
Executing the example requires a form with the Button1 button located on it, the TabSheetBox component and the UiTabSheet component named UiTabSheet1. 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: