Target: TabCellSearchTarget;
The Target property determines, by which cell properties the search is performed.
The property may take multiple values, so the search is executed based on all properties specified in the Target field. Default value of the Target property is set as Value.
Executing the example requires that the form contains the following components:
Buttons named Button1.
The TabSheetBox component.
The UiTabSheet component named UiTabSheet1, which is the 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.Target := TabCellSearchTarget.Formula Or TabCellSearchTarget.Text;
Result := CellSearch.Execute;
If Result <> Null Then
i := Result.CurrentRow;
j := Result.CurrentColumn;
End If;
End Sub Button1OnClick;
Clicking this button starts search in the cells containing formulas and text. 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: