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


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
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

GcNumberCellType Class
GcNumberCellType Members

 

 


Copyright © GrapeCity, inc. All rights reserved.