ITabFormatCondition.AssignPredefinedDataBar

Syntax

AssignPredefinedDataBar(Style: TabConditionPredefinedDataBarStyle);

Parameters

Style - histogram style.

Description

The AssignPredefinedDataBar method loads settings of the standard conditional format with a histogram to the current 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;
        Rng: ITabRange;
        Condition: ITabFormatCondition;
    Begin
        TSheet := TabSheetBox1.Source.GetTabSheet;
        Rng := TSheet.View.Selection.Range;
        Condition := Rng.FormatConditions.Add;
        Condition.AssignPredefinedDataBar(TabConditionPredefinedDataBarStyle.Blue);
    End Sub Button1OnClick;

Clicking the buttons creates a new conditional format for the selected cell range. Settings of this format are loaded from the standard conditional format with blue histogram.

See also:

ITabFormatCondition