StartColor: IGxColor;
StartColor: Prognoz.Platform.Interop.Drawing.GxColor;
The StartColor property determines primary color of the scale.
The property is relevant if the UseAutoColors property is set to True.
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.
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: