Spread ASP.NET 6.0 Product Documentation
SelectionForeColor Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class : SelectionForeColor Property


Glossary Item Box

Gets or sets the text color for selected cells.

Syntax

Visual Basic (Declaration) 
Public Property SelectionForeColor As Color
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim value As Color
 
instance.SelectionForeColor = value
 
value = instance.SelectionForeColor
C# 
public Color SelectionForeColor {get; set;}

Property Value

Color object containing the color of text in the selected cells

Remarks

To set the background color for selected cells, set the SelectionBackColor property.

This property is not used for client-side scripting.

The selection text color and selection border are displayed only in down-level browsers.

Example

This example uses the SheetView object to change the appearance of a selected cell or cells, and selects a range of cells and returns if a cell in row 0 has been selected.
C#Copy Code
FarPoint.Web.Spread.SheetViewsv=FpSpread1.ActiveSheetView;
FarPoint.Web.Spread.Borderbord=newFarPoint.Web.Spread.Border(BorderStyle.Double,Color.Tomato,3);
boolbl;
sv.SelectionModel.SetSelection(0,0,3,3);
bl=sv.SelectionModel.IsAnyCellInRowSelected(0);
sv.SelectionBackColor=Color.Yellow;
sv.SelectionForeColor=Color.Red;
sv.SelectionBorder=bord;
sv.SetValue(0,0,"Test");
ListBox1.Items.Add(Convert.ToString(bl));
Visual BasicCopy Code
DimsvAsFarPoint.Web.Spread.SheetView
DimbordAsNewFarPoint.Web.Spread.Border(BorderStyle.Double,Color.Tomato,3)
DimblAsBoolean
sv=FpSpread1.ActiveSheetView
sv.SelectionModel.SetSelection(0,0,3,3)
bl=sv.SelectionModel.IsAnyCellInRowSelected(0)
sv.SelectionBackColor=Color.Yellow
sv.SelectionForeColor=Color.Red
sv.SelectionBorder=bord
sv.SetValue(0,0,"Test")
ListBox1.Items.Add(bl)

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.