IEaxTableStyle.RangeCellStyles

Syntax

RangeCellStyles: IEaxRangeCellStyles;

Description

The RangeCellStyles property returns a collection of table formatting styles.

Comments

Each collection element is implemented by the IEaxRangeCellStyle interface.

Example

Executing the example requires a form, a button named Button1 on the form, the LanerBox component and the UiErAnalyzer component named UiErAnalyzer1, that is a data source for LanerBox. The workbook of time series database is to be loaded to the UiErAnalyzer1. Add a link to the Drawings system assembly.

This example is executed on clicking the button.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Grid: IEaxGrid;
    View: ITabView;
    Range: ITabRange;
    Style: IEaxTableStyle;
    CStyles: IEaxRangeCellStyles;
    CellStyle: ITabCellStyle;
Begin
    Grid := UiErAnalyzer1.ErAnalyzer.Grid;
    View := Grid.TabSheet.View;
    Range := View.Selection.Range;
    Style := Grid.Style;
    CStyles := Style.RangeCellStyles;
    CStyles.Clear;
    CellStyle := New TabCellStyle.Create;
    CellStyle.BackgroundColor := GxColor.FromKnownColor(GxKnownColor.Tomato);
    CellStyle.DisplayEmptyAs := "Null";
    CStyles.Add(Range, CellStyle);
    Grid.Refresh;
End Sub Button1OnClick;

After executing this example a new element is added to the collection  of table formatting styles. The created style is applied to the selected table area.

See also:

IEaxTableStyle