ITabFormatCellContent.MaxValue

Syntax

MaxValue: Variant;

Description

The MaxValue property determines the maximum value, to which cell values should be compared to define, whether they satisfy the condition set in the ValueCondition property.

Comments

This property is used if the ContentType property is set to the CellValue value, and the ValueCondition is set to the Between or Outside.

Example

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

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Tab: ITabSheet;

Range: ITabRange;

FormCond: ITabFormatCondition;

ValFormat: ITabFormatCellContent;

Style: ITabCellStyle;

Begin

Style := New TabCellStyle.Create;

Style.Font.Color := GxColor.FromName("White");

Style.BackgroundColor := GxColor.FromName("Black");

Tab := TabSheetBox1.Source.GetTabSheet;

Range := Tab.View.Selection.Range;

FormCond := Range.FormatConditions.Add;

FormCond.Type := TabConditionType.CellContent;

ValFormat := FormCond.Details As ITabFormatCellContent;

ValFormat.ContentType := TabFormatContentType.CellValue;

ValFormat.ValueCondition := TabConditionCellContentValue.Between;

ValFormat.MinValue := 0;

ValFormat.MaxValue := 100;

ValFormat.Style := Style;

End Sub Button1OnClick;

As a result, when the button is clicked, for the selected cell range a conditional format will e added, which applies to cells with certain values. Cell values from the range "0-100", will be displayed in white font on black background.

See also:

ITabFormatCellContent