ITabFormatValues.IconType

Syntax

IconType: TabConditionIconType;

Description

The IconType property determines the type of icon used when formatting cells.

It is used if the Style property is set to the IconSets value.

Example

Executing the example requires a form with the Button1 button located on it, the TabSheetBox component named TabSheetBox1 and a data source for TabSheetBox.

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