AssignPredefinedScale(ScaleType: TabConditionPredefinedScaleStyle);
AssignPredefinedScale(ScaleType: Prognoz.Platform.Interop.Tab.TabConditionPredefinedScaleStyle);
ScaleType. Color scale style.
The AssignPredefinedScale method loads parameters of standard color scale to the conditional format.
To execute the example a form with the button on it named Button1, the TabSheetBox component named TabSheetBox1 name and a data source for TabSheetBox1 are required.
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.
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
TSheet: ITabSheet;
Range: ITabRange;
Condition: ITabFormatCondition;
Begin
TSheet := TabSheetBoxNet1.Source.GetTabSheet();
Range := TSheet.View.Selection.Range;
Condition := Range.FormatConditions.Add();
Condition.AssignPredefinedScale(TabConditionPredefinedScaleStyle.tcpssGreenGradient);
End Sub;
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: