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 headerException | Description |
---|---|
System.ArgumentException | Specified style (NamedStyle object) could not be found in the collection |
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 Basic | Copy 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" |
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2