ComponentOne FlexReport for WinForms
C1.Win.FlexReport.4.5.2 Assembly / C1.Win.FlexReport Namespace / BarCodeField Class / ForeColor Property

In This Topic
    ForeColor Property (BarCodeField)
    In This Topic
    Gets or sets the field's foreground color.
    Public Property ForeColor As System.Drawing.Color
    public System.Drawing.Color ForeColor {get; set;}
    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 code below uses script to change the color of the text in the UnitsInStock field when its value falls below the reorder level.
    // build script
    string script = "UnitsInStock.ForeColor = " +
    	"IIF(UnitsInStock < ReorderLevel, vbRed, vbBlack)";
    // assign script to detail section
    _c1r.Sections.Detail.OnPrint = script;
    See Also