BackColor Property
See Also DLL Example 1 Example 2
Applies To
fpSpread control
Description
Sets or returns the background color of a portion of or the entire sheet. This property is available at run time only.
Syntax
OLE_COLOR CSpreadSheet::GetBackColor( );
void CSpreadSheet::SetBackColor(OLE_COLOR value);
[form.]fpSpread.BackColor[ = color]
Remarks
The default value for the BackColor property is &H00FFFFFF& (white).
This setting is applied to the current sheet setting unless you first set the Sheet property to specify the sheet for which you are setting the property. Before specifying the background color, specify the cell or cells to which to apply the color, as described in Using Column and Row Properties. Then set the background color.
When cells are locked with the Lock and Protect properties, the value of the LockBackColor property overrides the value of the BackColor property.
If you use the BackColor property to retrieve the background color for a block of cells that do not all have the same background color, the background color of the active cell is returned.
Notes:
|
If you are working with button cells, use the TypeButtonColor property to specify the color of the face of the buttons. Set the BackColorStyle property to specify whether the background color overlaps grid lines. If you prefer, you can use alternating background colors for the rows in the sheet by using the SetOddEvenRowColor method.
Use the ForeColor property to specify the text color of a portion of or the entire sheet.
Spread Designer
Choose the Cell menu, the Cell Colors menu, and then the Colors tab, and then select BackColor in the Property drop-down list box in the Cell Settings dialog box.
Specify the portion of the sheet to which to apply the text color using the instructions in Selecting an Item in Spread Designer. Then use the drop-down list box to specify the text color.
Data Type
Color
See Also
Setting Cell Background and Text Colors
BackColorStyle, ForeColor, Sheet, TypeButtonColor properties
GetOddEvenRowColor, SetOddEvenRowColor methods
DLL Correspondence
SSGetColor, SSSetColor, SetColorRange functions