ITabFormatCondition.AssignPredefinedScale

Syntax

AssignPredefinedScale(ScaleType: TabConditionPredefinedScaleStyle);

Properties

ScaleType. Color scale style.

Description

The AssignPredefinedScale method loads parameters of standard color scale to the conditional format.

Example

Executing the example requires a form with the Button1 button located on it, the TabSheetBox component named TabSheetBox1 and a data source for TabSheetBox1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    TSheet: ITabSheet;
    Range: ITabRange;
    Condition: ITabFormatCondition;
Begin
    TSheet := TabSheetBox1.Source.GetTabSheet;
    Range := TSheet.View.Selection.Range;
    Condition := Range.FormatConditions.Add;
    Condition.AssignPredefinedScale(TabConditionPredefinedScaleStyle.GreenGradient);
End Sub Button1OnClick;

Clicking the buttons creates a new conditional format for the selected cell range. Conditional format settings are loaded from the standard color scale based on the green gradient.

See also:

ITabFormatCondition