Spread Windows Forms 7.0 Product Documentation
DefaultStyleName Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > ColumnHeader Class : DefaultStyleName Property


Glossary Item Box

Gets or sets the name of the default style for the column header.

Syntax

Visual Basic (Declaration) 
Public Property DefaultStyleName As String
Visual Basic (Usage)Copy Code
Dim instance As ColumnHeader
Dim value As String
 
instance.DefaultStyleName = value
 
value = instance.DefaultStyleName
C# 
public string DefaultStyleName {get; set;}

Property Value

String containing the name of the default style for the header

Exceptions

ExceptionDescription
System.ArgumentExceptionSpecified style (NamedStyle object) could not be found in the collection

Example

This example sets the background color of all the columns in the column header, based on the DefaultStyleName.
C#Copy Code
FarPoint.Win.Spread.ColumnHeader ch;
FarPoint.Win.Spread.NamedStyle style = new FarPoint.Win.Spread.NamedStyle("ColumnHeader");
ch = fpSpread1.ActiveSheet.ColumnHeader;
ch.RowCount = 3;
style.BackColor = Color.Teal;
fpSpread1.NamedStyles.Add(style);
ch.DefaultStyleName = "ColumnHeader";
Visual BasicCopy Code
Dim ch As FarPoint.Win.Spread.ColumnHeader
Dim style As New FarPoint.Win.Spread.NamedStyle("ColumnHeader")
ch = FpSpread1.ActiveSheet.ColumnHeader
ch.RowCount = 3
style.BackColor = Color.Teal
FpSpread1.NamedStyles.Add(style)
ch.DefaultStyleName = "ColumnHeader"

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.