Spread Windows Forms 12.0 Product Documentation
Style Constructor(Color,Color)
Example 


GrapeCity.Win.PluginInputMan Assembly > GrapeCity.Win.Spread.InputMan.CellType Namespace > Style Class > Style Constructor : Style Constructor(Color,Color)
The System.Drawing.Color of the background.
The System.Drawing.Color of the foreground.
Initializes a new instance of the Style class with the specified initialization properties.
Syntax
'Declaration
 
Public Function New( _
   ByVal backColor As Color, _
   ByVal foreColor As Color _
)
'Usage
 
Dim backColor As Color
Dim foreColor As Color
 
Dim instance As New Style(backColor, foreColor)
public Style( 
   Color backColor,
   Color foreColor
)

Parameters

backColor
The System.Drawing.Color of the background.
foreColor
The System.Drawing.Color of the foreground.
Example
This example creates a style for the calendar.
GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType datecell = new GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType();
fpSpread1.Sheets[0].Cells[0, 0].CellType = datecell;
datecell.DropDownCalendar.AllowSelection = GrapeCity.Win.Spread.InputMan.CellType.AllowSelection.Anyday;
datecell.DropDownCalendar.EmptyRows = GrapeCity.Win.Spread.InputMan.CellType.EmptyRows.AllAtEnd;
datecell.DropDownCalendar.FirstDayOfWeek = GrapeCity.Win.Spread.InputMan.CellType.DayOfWeek.Friday;
datecell.DropDownCalendar.FlatStyle = FlatStyle.Popup;
datecell.DropDownCalendar.HeaderStyle = new GrapeCity.Win.Spread.InputMan.CellType.Style(Color.Crimson, Color.Black);
datecell.DropDownCalendar.NavigatorOrientation = GrapeCity.Win.Spread.InputMan.CellType.NavigatorOrientation.Bottom;
datecell.DropDownCalendar.ShowNavigator = GrapeCity.Win.Spread.InputMan.CellType.CalendarNavigators.ScrollBar;
datecell.DefaultActiveField = datecell.Fields[2];
Dim datecell As New GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType()
fpSpread1.Sheets(0).Cells(0, 0).CellType = datecell
datecell.DropDownCalendar.AllowSelection = GrapeCity.Win.Spread.InputMan.CellType.AllowSelection.Anyday
datecell.DropDownCalendar.EmptyRows = GrapeCity.Win.Spread.InputMan.CellType.EmptyRows.AllAtEnd
datecell.DropDownCalendar.FirstDayOfWeek = GrapeCity.Win.Spread.InputMan.CellType.DayOfWeek.Friday
datecell.DropDownCalendar.FlatStyle = FlatStyle.Popup
datecell.DropDownCalendar.HeaderStyle = New GrapeCity.Win.Spread.InputMan.CellType.Style(Color.Crimson, Color.Black)
datecell.DropDownCalendar.NavigatorOrientation = GrapeCity.Win.Spread.InputMan.CellType.NavigatorOrientation.Bottom
datecell.DropDownCalendar.ShowNavigator = GrapeCity.Win.Spread.InputMan.CellType.CalendarNavigators.ScrollBar
datecell.DefaultActiveField = datecell.Fields(2)
See Also

Reference

Style Class
Style Members
Overload List