Spread Windows Forms 6.0 Product Documentation
FocusRenderer Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : FocusRenderer Property


Glossary Item Box

Gets or sets the focus indicator renderer for drawing the focus rectangle in the component.

Syntax

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

Property Value

IFocusIndicatorRenderer instance that determines the focus renderer

Remarks

There are implementations of IFocusIndicatorRenderer that you can use to assign custom focus indicators with this property.

  • DefaultFocusIndicatorRenderer is the default renderer and applies unless you change it. You can customize the thickness of the line when you create a renderer based on the default renderer. You can create one with a custom thickness and assign it to with this property.
  • SolidFocusIndicatorRenderer draws a solid border using a custom color and thickness.
  • ImageFocusIndicatorRenderer uses an Image object. The image is drawn scaled to the size of the cell, so it may be stretched or contracted in width or height as needed to paint around the cell.

Example

This example changes the focus rectangle to solid.
C#Copy Code
fpSpread1.FocusRenderer = new FarPoint.Win.Spread.SolidFocusIndicatorRenderer(Color.Cyan, 1);
Visual BasicCopy Code
FpSpread1.FocusRenderer = New FarPoint.Win.Spread.SolidFocusIndicatorRenderer(Color.Cyan, 1)

Requirements

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

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.