Spread Windows Forms 12.0 Product Documentation
UseNegativeColor Property (GcNumberCellType)
Example 


GrapeCity.Win.PluginInputMan Assembly > GrapeCity.Win.Spread.InputMan.CellType Namespace > GcNumberCellType Class : UseNegativeColor Property
Gets or sets a value that indicates whether to use the GcNumber.NegativeColor property to display the negative value.
Syntax
'Declaration
 
Public Property UseNegativeColor As Boolean
'Usage
 
Dim instance As GcNumberCellType
Dim value As Boolean
 
instance.UseNegativeColor = value
 
value = instance.UseNegativeColor
public bool UseNegativeColor {get; set;}

Property Value

true means use GcNumber.NegativeColor to render the negative value; false means use GcNumber.ForeColor to render the negative value.
The default is true.
Remarks
If the GrapeCity.Win.Value property is smaller than zero and the UseNegativeColor property is true, the text color uses this property.
Example
This example sets the negative value color.
GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType ncell1 = new GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType();
ncell1.NegativeColor = Color.Red;
ncell1.UseNegativeColor = true;
fpSpread1.Sheets[0].Cells[1, 1].CellType = ncell1;
fpSpread1.Sheets[0].Cells[1, 1].Value = -1;
Dim ncell1 As New GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType()
ncell1.NegativeColor = Color.Red
ncell1.UseNegativeColor = True
fpSpread1.Sheets(0).Cells(1, 1).CellType = ncell1
fpSpread1.Sheets(0).Cells(1, 1).Value = -1
See Also

Reference

GcNumberCellType Class
GcNumberCellType Members