Text: String;
The Text property determines the text to be searched for in the cells.
To execute the example a form with a button on it named Button1, the TabSheetBox component and the UiTabSheet component with the name UiTabSheet1 which is used as a data source for the TabSheetBox component are required.
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 := "element1";
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 element1 value in the cells. 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: