ITabCellSearch.RequiredStyle

Syntax

RequiredStyle: ITabCellStyle;

Description

The RequiredStyle property determines style of the cells to be included in the search.

Example

Executing the example requires a form with the Button1 button located on it, the TabSheetBox component and the UiTabSheet component named UiTabSheet1,that is used as a data source for the TabSheetBox component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        TSheet: ITabSheet;
        CellSearch: ITabCellSearch;
        Result: ITabSearchResult;
        i, j: Integer;
        Style: ITabCellStyle;
    Begin
        TSheet := UiTabSheet1.TabSheet;
        CellSearch := TSheet.CreateCellSearch;
        Style := New TabCellStyle.Create;
        Style.BackgroundColor := GxColor.FromName("Red");
        CellSearch.RequiredStyle := Style;
        Result := CellSearch.Execute;
        If Result <> Null Then
            i := Result.CurrentRow;
            j := Result.CurrentColumn;
        End If;
    End Sub Button1OnClick;

Click this button to search in the cells with red-colored background. 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