ITabFormatScale.StartColor

Fore Syntax

StartColor: IGxColor;

Fore.NET Syntax

StartColor: Prognoz.Platform.Interop.Drawing.GxColor;

Description

The StartColor property determines primary color of the scale.

Comments

The property is relevant if the UseAutoColors property is set to True.

Fore Example

To execute the example a form with the button named Button1 on it, the TabSheetBox component named TabSheetBox1 and a data source for TabSheetBox1 are required.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Tab: ITabSheet;
    Range: ITabRange;
    FormCond: ITabFormatCondition;
    Scale: ITabFormatScale;
Begin
    Tab := TabSheetBox1.Source.GetTabSheet;
    Range := Tab.View.Selection.Range;
    FormCond := Range.FormatConditions.Add;
    FormCond.Type := TabConditionType.Scale;
    Scale := FormCond.Details As ITabFormatScale;
    Scale.ScaleType := TabFormatScaleType.Linear;
    Scale.StartColor := GxColor.FromName("AntiqueWhite");
    Scale.EndColor := GxColor.FromName("Aquamarine");
End Sub Button1OnClick;

Clicking the buttons adds the conditional format for the selected cell range. Conditional formatting is performed as the color scale with linear color distribution. The start and end colors are determined for the scale.

Fore.NET Example

To execute the example a form with the button on it named Button1, the TabSheetBoxNet component named TabSheetBoxNet1 name and some data source for TabSheetBoxNet1 are required.

Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Tab;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    Tab: ITabSheet;
    Range: ITabRange;
    FormCond: ITabFormatCondition;
    Scale: ITabFormatScale;
    GxColorCls: GxColorClassClass = New GxColorClassClass();
Begin
    Tab := TabSheetBoxNet1.Source.GetTabSheet();
    Range := Tab.View.Selection.Range;
    FormCond := Range.FormatConditions.Add();
    FormCond.Type := TabConditionType.tctScale;
    Scale := FormCond.Details As ITabFormatScale;
    Scale.ScaleType := TabFormatScaleType.tfstLinear;
    Scale.StartColor := GxColorCls.FromName("AntiqueWhite");
    Scale.EndColor := GxColorCls.FromName("Aquamarine");
End Sub;

Clicking the buttons adds the conditional format for the selected cell range. Conditional formatting is performed as the color scale with linear color distribution. The start and end colors are determined for the scale.

See also:

ITabFormatScale