Visual Basic (Declaration) | |
---|---|
Public Property DefaultStyle As StyleInfo |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As ColumnHeader Dim value As StyleInfo instance.DefaultStyle = value value = instance.DefaultStyle |
C# | |
---|---|
public StyleInfo DefaultStyle {get; set;} |
Property Value
StyleInfo object containing style information for cells in this column headerWhen defining and applying a custom style to header cells, be sure to set the text alignment. The default renderer (without any style applied) centers the text; if you apply a style, and do not set the alignment, the text is left-aligned not centered.
This example sets the background color to red, and then applies that style to the column header, which sets all the column headers to a red background.
C# | Copy Code |
---|---|
FarPoint.Web.Spread.ColumnHeader colhdr;
FarPoint.Web.Spread.StyleInfo mystyle = new FarPoint.Web.Spread.StyleInfo();
mystyle.BackColor = Color.Red;
colhdr = FpSpread1.ActiveSheetView.ColumnHeader;
colhdr.DefaultStyle = mystyle; |
Visual Basic | Copy Code |
---|---|
Dim colhdr As FarPoint.Web.Spread.ColumnHeader Dim mystyle As New FarPoint.Web.Spread.StyleInfo() mystyle.BackColor = Color.Red colhdr = FpSpread1.ActiveSheetView.ColumnHeader colhdr.DefaultStyle = mystyle |
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
Reference
ColumnHeader ClassColumnHeader Members
StyleInfo Class
DefaultStyleName Property