Gets or sets the field's foreground color.
Namespace:
C1.C1ReportAssembly: C1.C1Report.2 (in C1.C1Report.2.dll)
Syntax
C# |
---|
[DefaultValueAttribute(typeof(Color), "Black")] public Color ForeColor { get; set; } |
Visual Basic |
---|
<DefaultValueAttribute(GetType(Color), "Black")> _ Public Property ForeColor As Color Get Set |
Remarks
Use the ForeColor property to specify the color for text in a field. You can use this property to make fields easy to read or to convey a special meaning.
The default value for this property is 'Black'.
Examples
The code below uses script to change the color of the text in the UnitsInStock field when its value
falls below the reorder level.
Copy CodeC#
// build script string script = "UnitsInStock.ForeColor = " + "IIF(UnitsInStock < ReorderLevel, vbRed, vbBlack)"; // assign script to detail section _c1r.Sections.Detail.OnPrint = script; |