PointCondition(Index: Integer): TabConditionIconRangeCond;
Index - the index of the rule, by which the displayed icon is selected.
The PointCondition property determines the ratio, by which values, satisfying the condition, are selected. It is used if the Style property is set to the IconSets value.
To execute the example a form, a button on this form named Button1, the TabSheetBox component named TabSheetBox1 and a data source for this component are required.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Tab: ITabSheet;
Range: ITabRange;
FormCond: ITabFormatCondition;
ValFormat: ITabFormatValues;
Begin
Tab := TabSheetBox1.Source.GetTabSheet;
Range := Tab.View.Selection.Range;
FormCond := Range.FormatConditions.Add;
FormCond.Type := TabConditionType.Values;
ValFormat := FormCond.Details As ITabFormatValues;
//adjusting display format on the basis of cell values
ValFormat.Style := TabFormatValuesStyle.IconSets;
ValFormat.IconType := TabConditionIconType.CircleFillC;
// part 1
ValFormat.PointType(0) := TabFormatValueType.Percent;
ValFormat.PointValue(0) := 15;
ValFormat.PointCondition(0) := TabConditionIconRangeCond.AboveEqual;
// part 2
ValFormat.PointType(1) := TabFormatValueType.Percent;
ValFormat.PointValue(1) := 35;
ValFormat.PointCondition(1) := TabConditionIconRangeCond.AboveEqual;
// part 3
ValFormat.PointType(2) := TabFormatValueType.Percent;
ValFormat.PointValue(2) := 55;
ValFormat.PointCondition(2) := TabConditionIconRangeCond.AboveEqual;
// part 4
ValFormat.PointType(3) := TabFormatValueType.Percent;
ValFormat.PointValue(3) := 75;
ValFormat.PointCondition(3) := TabConditionIconRangeCond.AboveEqual;
End Sub Button1OnClick;
As a result when the button is clicked, a conditional format will be added for the selected cell range, applied to cells on the basis of their values. Formatting style - icons. Colored circle filling is used as icons. The rules of displaying icons will be set as percent of maximum value in the selected cell range.
See also:
ITabFormatValues | ITabFormatValues.PointType | ITabFormatValues.PointValue