Forums     Knowledge Base     OfficeWriter Online     
 
This documentation is for
OfficeWriter v3.0.4
.NET Platform

View Docs for Another
Version or Platform

Programmer's Reference > ExcelApplication API > Style > ForegroundColor

ForegroundColor Property


C# Signature:

VB.NET Signature:


Description:

Sets or returns a foreground color for cells. A foreground color is visible when a pattern is assigned to a cell.

ForegroundColor is a read / write property.



Examples:

[csharp]
// Get ForegroundColor
Color fgColor = styl.ForegroundColor;

// Set ForegroundColor
styl.ForegroundColor = wb.Palette.GetClosestColor(162, 221, 139);
[vbnet]
' Get ForegroundColor
Dim fgColor As Color = styl.ForegroundColor

' Set ForegroundColor
styl.ForegroundColor = wb.Palette.GetClosestColor(162, 221, 139)


Getter

Signature:

public Color ForegroundColor

Returns:

Color A Color object from the workbook's Palette.

Setter

Signature:

public void ForegroundColor Color fgColor

Type:

Color



Copyright 2005 © SoftArtisans, Inc. All Rights Reserved.