Spread Windows Forms 7.0 Product Documentation
Appearance Constructor(Color,Color,Font,CellHorizontalAlignment,CellVerticalAlignment,Boolean,Boolean,Color,Color,Color,Color,VisualStyles,SortState,FilterState)
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > Appearance Class > Appearance Constructor : Appearance Constructor(Color,Color,Font,CellHorizontalAlignment,CellVerticalAlignment,Boolean,Boolean,Color,Color,Color,Color,VisualStyles,SortState,FilterState)


backColor
Background color of an object
foreColor
Foreground (text) color of an object
font
Font information of an object
horizontalAlignment
Horizontal alignment of an object or of text in a cell
verticalAlignment
Vertical alignment of an object or text in a cell
drawPrimaryButton
Whether to draw the primary button for an object
drawSecondaryButton
Whether to draw the secondary button for an object
selectionBackColor
Background color of an object when the object is selected
selectionForeColor
Foreground (text) color of an object when the object is selected
lockBackColor
Background color of an object when the cell is locked
lockForeColor
Foreground (text) color of an object when the cell is locked
visualStyle
Whether to render with visual styles (as in XP themes)
sortState
Sorting state
filterState
Filtering state

Glossary Item Box

Creates a set of appearance settings with the specified colors, buttons, alignment, visual style, and sorting and filtering states.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal backColor As Color, _
   ByVal foreColor As Color, _
   ByVal font As Font, _
   ByVal horizontalAlignment As CellHorizontalAlignment, _
   ByVal verticalAlignment As CellVerticalAlignment, _
   ByVal drawPrimaryButton As Boolean, _
   ByVal drawSecondaryButton As Boolean, _
   ByVal selectionBackColor As Color, _
   ByVal selectionForeColor As Color, _
   ByVal lockBackColor As Color, _
   ByVal lockForeColor As Color, _
   ByVal visualStyle As VisualStyles, _
   ByVal sortState As SortState, _
   ByVal filterState As FilterState _
)
Visual Basic (Usage)Copy Code
Dim backColor As Color
Dim foreColor As Color
Dim font As Font
Dim horizontalAlignment As CellHorizontalAlignment
Dim verticalAlignment As CellVerticalAlignment
Dim drawPrimaryButton As Boolean
Dim drawSecondaryButton As Boolean
Dim selectionBackColor As Color
Dim selectionForeColor As Color
Dim lockBackColor As Color
Dim lockForeColor As Color
Dim visualStyle As VisualStyles
Dim sortState As SortState
Dim filterState As FilterState
 
Dim instance As New Appearance(backColor, foreColor, font, horizontalAlignment, verticalAlignment, drawPrimaryButton, drawSecondaryButton, selectionBackColor, selectionForeColor, lockBackColor, lockForeColor, visualStyle, sortState, filterState)

Parameters

backColor
Background color of an object
foreColor
Foreground (text) color of an object
font
Font information of an object
horizontalAlignment
Horizontal alignment of an object or of text in a cell
verticalAlignment
Vertical alignment of an object or text in a cell
drawPrimaryButton
Whether to draw the primary button for an object
drawSecondaryButton
Whether to draw the secondary button for an object
selectionBackColor
Background color of an object when the object is selected
selectionForeColor
Foreground (text) color of an object when the object is selected
lockBackColor
Background color of an object when the cell is locked
lockForeColor
Foreground (text) color of an object when the cell is locked
visualStyle
Whether to render with visual styles (as in XP themes)
sortState
Sorting state
filterState
Filtering state

Example

This example uses an Appearance object to set up the behavior for a StyleInfo object.
C#Copy Code
FarPoint.Win.Spread.Appearance appr = new FarPoint.Win.Spread.Appearance(Color.Lavender, Color.LavenderBlush, new Font("Ms Sans Serif", 10), CellHorizontalAlignment.Center, CellVerticalAlignment.Center, true, true, Color.Yellow, Color.Aqua, Color.Bisque, Color.Azure, Win.VisualStyles.On, SortState.None, FilterState.None);
FarPoint.Win.Spread.StyleInfo si = new FarPoint.Win.Spread.StyleInfo();
si.SetAppearance(appr);
fpSpread1.ActiveSheet.SetStyleInfo(-1, -1, si);
Visual BasicCopy Code
Dim appr As New FarPoint.Win.Spread.Appearance(Color.Lavender, Color.LavenderBlush, New Font("Ms Sans Serif", 10), CellHorizontalAlignment.Center, CellVerticalAlignment.Center, True, True, Color.Yellow, Color.Aqua, Color.Bisque, Color.Azure, Win.VisualStyles.On, SortState.None, FilterState.None)
Dim si As New FarPoint.Win.Spread.StyleInfo
si.SetAppearance(appr)
FpSpread1.ActiveSheet.SetStyleInfo(-1, -1, si)

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.