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

Glossary Item Box

ForeColor Property


See Also    DLL    Example

Applies To

fpSpread control

Description

Sets or returns the text color of a portion of or the entire sheet. This property is available at run time only.

Syntax

C++

OLE_COLOR CSpreadSheet::GetForeColor( );
void CSpreadSheet::SetForeColor(OLE_COLOR value);

Visual Basic

[form.]fpSpread.ForeColor[ = color]

Remarks

The default value for the ForeColor property is &H00000000& (black).

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 text color, specify the cell or cells to which to apply the color, as described in Using Column and Row Properties. Then set the text color.

If you use the ForeColor property to retrieve the text color for a block of cells that do not all have the same text color, the text color for the active cell is returned.

If you are working with button cells, use the TypeButtonTextColor property to specify the color of the text in the buttons. If you are working with static text cells that display a three-dimensional appearance or header cells, use the ShadowText property to specify the color of the text in the cells.

Use the BackColor property to specify the background 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 ForeColor 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

BackColor, ShadowText, Sheet, TypeButtonTextColor properties

DLL Correspondence

SSGetColor, SSSetColor, SSSetColorRange functions

Copyright © GrapeCity, inc. All rights reserved.