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


Glossary Item Box

Gets or sets the selection renderer of the Spread skin.

Syntax

Visual Basic (Declaration) 
Public Property SelectionRenderer As ISelectionRenderer
Visual Basic (Usage)Copy Code
Dim instance As SpreadSkin
Dim value As ISelectionRenderer
 
instance.SelectionRenderer = value
 
value = instance.SelectionRenderer
C# 
public ISelectionRenderer SelectionRenderer {get; set;}

Property Value

ISelectionRenderer object containing the renderer

Example

This example customizes the skin for the spreadsheet.
C#Copy Code
fpSpread1.Sheets.Count = 3;
FarPoint.Win.Spread.SpreadSkin skin = new FarPoint.Win.Spread.SpreadSkin();
FarPoint.Win.Spread.StyleInfo chd = new FarPoint.Win.Spread.StyleInfo();
chd.BackColor = Color.LightGreen;
FarPoint.Win.Spread.StyleInfo cds = new FarPoint.Win.Spread.StyleInfo();
cds.BackColor = Color.LightGreen;
FarPoint.Win.Spread.StyleInfo rhd = new FarPoint.Win.Spread.StyleInfo();
rhd.BackColor = Color.LightGreen;
FarPoint.Win.Spread.StyleInfo def = new FarPoint.Win.Spread.StyleInfo();
FarPoint.Win.Spread.GradientSelectionRenderer gsr = new FarPoint.Win.Spread.GradientSelectionRenderer();
gsr.Color1 = Color.Green;
gsr.Color2 = Color.LightGreen;
gsr.LinearGradientMode = Drawing2D.LinearGradientMode.BackwardDiagonal;
gsr.Opacity = 50;
def.BackColor = Color.Honeydew;
FarPoint.Win.Spread.EnhancedInterfaceRenderer int = new FarPoint.Win.Spread.EnhancedInterfaceRenderer();
int.ArrowColorDisabled = Color.Green;
int.ArrowColorEnabled = Color.LightSeaGreen;
int.ScrollBoxBackgroundColor = Color.Aqua;
int.TabShape = FarPoint.Win.Spread.EnhancedInterfaceRenderer.SheetTabShape.RoundedRectangle;
int.TabStripButtonStyle = FarPoint.Win.Spread.EnhancedInterfaceRenderer.ButtonStyles.Enhanced;
int.TabStripButtonFlatStyle = FlatStyle.Popup;
int.SheetTabBorderColor = Color.Aquamarine;
int.SheetTabLowerActiveColor = Color.DarkSeaGreen;
int.SheetTabLowerNormalColor = Color.DarkOliveGreen;
int.SheetTabUpperActiveColor = Color.ForestGreen;
int.SheetTabUpperNormalColor = Color.LightSeaGreen;
int.SplitBarBackgroundColor = Color.Aquamarine;
int.SplitBarDarkColor = Color.DarkGreen;
int.SplitBarLightColor = Color.LightGreen;
int.SplitBoxBackgroundColor = Color.Green;
int.SplitBoxBorderColor = Color.LimeGreen;
int.TabStripBackgroundColor = Color.Aquamarine;
skin.BackColor = Color.Aquamarine;
skin.ColumnHeaderDefaultStyle = new FarPoint.Win.Spread.NamedStyle("ColumnHeaders", "HeaderDefault", chd);
skin.CornerDefaultStyle = new FarPoint.Win.Spread.NamedStyle("CornerHeaders", "HeaderDefault", cds);
skin.RowHeaderDefaultStyle = new FarPoint.Win.Spread.NamedStyle("RowHeaders", "HeaderDefault", rhd);
skin.DefaultStyle = new FarPoint.Win.Spread.NamedStyle("Default", "DataAreaDefault", def);
skin.EvenRowBackColor = Color.White;
skin.FlatColumnHeader = false;
skin.FlatRowHeader = false;
skin.FocusRenderer = new FarPoint.Win.Spread.MarqueeFocusIndicatorRenderer(Color.LightSeaGreen, 2);
skin.GridLineColor = Color.Aqua;
skin.GridLines = FarPoint.Win.Spread.GridLines.Both;
skin.InterfaceRenderer = int;
skin.Name = "FarPoint Skin";
skin.OddRowBackColor = Color.Honeydew;
skin.ScrollBarRenderer = new FarPoint.Win.Spread.EnhancedScrollBarRenderer(Color.Green, Color.LightGreen, Color.Green, Color.Aqua,
Color.DarkGreen, Color.DarkSeaGreen, Color.Turquoise, Color.SpringGreen, Color.Teal, Color.PaleGreen, Color.ForestGreen);
skin.SelectionBackColor = Color.Green;
skin.SelectionForeColor = Color.LightBlue;
skin.SelectionRenderer = gsr;
skin.ShowColumnHeader = true;
skin.ShowRowHeader = true;
skin.Apply(fpSpread1);
FarPoint.Win.Spread.SpreadSkin.Save(skin, "c:\\forums3\\farpoint.skn");
Visual BasicCopy Code
FpSpread1.Sheets.Count = 3
Dim skin As New FarPoint.Win.Spread.SpreadSkin()
Dim chd As New FarPoint.Win.Spread.StyleInfo
chd.BackColor = Color.LightGreen
Dim cds As New FarPoint.Win.Spread.StyleInfo
cds.BackColor = Color.LightGreen
Dim rhd As New FarPoint.Win.Spread.StyleInfo
rhd.BackColor = Color.LightGreen
Dim def As New FarPoint.Win.Spread.StyleInfo
Dim gsr As New FarPoint.Win.Spread.GradientSelectionRenderer
gsr.Color1 = Color.Green
gsr.Color2 = Color.LightGreen
gsr.LinearGradientMode = Drawing2D.LinearGradientMode.BackwardDiagonal
gsr.Opacity = 50
def.BackColor = Color.Honeydew
Dim int As New FarPoint.Win.Spread.EnhancedInterfaceRenderer
int.ArrowColorDisabled = Color.Green
int.ArrowColorEnabled = Color.LightSeaGreen
int.ScrollBoxBackgroundColor = Color.Aqua
int.TabShape = FarPoint.Win.Spread.EnhancedInterfaceRenderer.SheetTabShape.RoundedRectangle
int.TabStripButtonStyle = FarPoint.Win.Spread.EnhancedInterfaceRenderer.ButtonStyles.Enhanced
int.TabStripButtonFlatStyle = FlatStyle.Popup
int.SheetTabBorderColor = Color.Aquamarine
int.SheetTabLowerActiveColor = Color.DarkSeaGreen
int.SheetTabLowerNormalColor = Color.DarkOliveGreen
int.SheetTabUpperActiveColor = Color.ForestGreen
int.SheetTabUpperNormalColor = Color.LightSeaGreen
int.SplitBarBackgroundColor = Color.Aquamarine
int.SplitBarDarkColor = Color.DarkGreen
int.SplitBarLightColor = Color.LightGreen
int.SplitBoxBackgroundColor = Color.Green
int.SplitBoxBorderColor = Color.LimeGreen
int.TabStripBackgroundColor = Color.Aquamarine
skin.BackColor = Color.Aquamarine
skin.ColumnHeaderDefaultStyle = New FarPoint.Win.Spread.NamedStyle("ColumnHeaders", "HeaderDefault", chd)
skin.CornerDefaultStyle = New FarPoint.Win.Spread.NamedStyle("CornerHeaders", "HeaderDefault", cds)
skin.RowHeaderDefaultStyle = New FarPoint.Win.Spread.NamedStyle("RowHeaders", "HeaderDefault", rhd)
skin.DefaultStyle = New FarPoint.Win.Spread.NamedStyle("Default", "DataAreaDefault", def)
skin.EvenRowBackColor = Color.White
skin.FlatColumnHeader = False
skin.FlatRowHeader = False
skin.FocusRenderer = New FarPoint.Win.Spread.MarqueeFocusIndicatorRenderer(Color.LightSeaGreen, 2)
skin.GridLineColor = Color.Aqua
skin.GridLines = FarPoint.Win.Spread.GridLines.Both
skin.InterfaceRenderer = int
skin.Name = "FarPoint Skin"
skin.OddRowBackColor = Color.Honeydew
skin.ScrollBarRenderer = New FarPoint.Win.Spread.EnhancedScrollBarRenderer(Color.Green, Color.LightGreen, Color.Green, Color.Aqua,
Color.DarkGreen, Color.DarkSeaGreen, Color.Turquoise, Color.SpringGreen, Color.Teal, Color.PaleGreen, Color.ForestGreen)
skin.SelectionBackColor = Color.Green
skin.SelectionForeColor = Color.LightBlue
skin.SelectionRenderer = gsr
skin.ShowColumnHeader = True
skin.ShowRowHeader = True
skin.Apply(FpSpread1)
FarPoint.Win.Spread.SpreadSkin.Save(skin, "c:\forums3\farpoint.skn")

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.