AssignPredefinedGradient(Style: TabConditionPredefinedGradientStyle);
AssignPredefinedGradient(Style: Prognoz.Platform.Interop.Tab.TabConditionPredefinedGradientStyle);
Style - style of gradient fill.
The AssignPredefinedGradient method loads settings of the standard conditional format with gradient fill to the current conditional format.
To execute the example a form with the button named Button1 on it, a TabSheetBox component named TabSheetBox1, and a data source for TabSheetBox1 are required.
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.AssignPredefinedGradient(TabConditionPredefinedGradientStyle.GreenYellowRed);
End Sub Button1OnClick;
Clicking the buttons creates a new conditional format for the selected cell range. Settings of this conditional format are loaded from the standard conditional format with the specified gradient fill.
To execute the example a form, a button named Button1 positioned on this form, the TabSheetBoxNet component named TabSheetBoxNet1, and a data source for TabSheetBoxNet1 are required.
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
TSheet: ITabSheet;
Rng: ITabRange;
Condition: ITabFormatCondition;
Begin
TSheet := TabSheetBoxNet1.Source.GetTabSheet();
Rng := TSheet.View.Selection.Range;
Condition := Rng.FormatConditions.Add();
Condition.AssignPredefinedGradient(TabConditionPredefinedGradientStyle.tcpgsGreenYellowRed);
End Sub;
Clicking the button creates a new conditional format for the selected cell range. Settings of this conditional format are loaded from the standard conditional format with the specified gradient fill.
See also: