Spread 8.0 Documentation
BackColor Property
Support Options
ActiveX Reference > ActiveX Properties > BackColor Property

Glossary Item Box

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

C++

OLE_COLOR CSpreadSheet::GetBackColor( );
void CSpreadSheet::SetBackColor(OLE_COLOR value);

Visual Basic

[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:
  • You cannot change the background color of the drop-down list portion of a combo box cell. The background color of the drop-down list portion of a combo box cell is always white.
  • By default, the background color of a cell overlaps the right and bottom sides of the cell's grid lines. Use the BackColorStyle property to specify whether the right grid line, the bottom grid line, or both overlap the background color.
  • To change the background color of a button cell, you must use the TypeButtonColor property.

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

Copyright © GrapeCity, inc. All rights reserved.