Spread Windows Forms 12.0 Product Documentation
ResetFocusRenderer Method

FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : ResetFocusRenderer Method
Resets the focus renderer to its original state.
Public Sub ResetFocusRenderer() 
Dim instance As FpSpread
public void ResetFocusRenderer()
This example uses the ResetFocusRenderer method.
public class MyIndicator : FarPoint.Win.Spread.IFocusIndicatorRenderer
    public void Paint(System.Drawing.Graphics g, int x, int y, int width, int height, bool left, bool top, bool right, bool bottom)
        SolidBrush r = new SolidBrush(System.Drawing.Color.Red);
        SolidBrush b = new SolidBrush(System.Drawing.Color.Blue);
        SolidBrush gr = new SolidBrush(System.Drawing.Color.DarkGreen);
        g.FillRectangle(r, x, y, 1, height);
        g.FillRectangle(gr, x, y, width, 1);
        g.FillRectangle(r, x + width - 1, y, 1, height);
        g.FillRectangle(b, x, y + height - 1, width, 1);

private void Form1_Load(object sender, EventArgs e)
    FarPoint.Win.Spread.SolidFocusIndicatorRenderer sfir = new FarPoint.Win.Spread.SolidFocusIndicatorRenderer(Color.Blue, 2);
    fpSpread1.FocusRenderer = sfir;
    fpSpread1.FocusRenderer = new MyIndicator();
 Public Class MyIndicator
    Implements FarPoint.Win.Spread.IFocusIndicatorRenderer
    Public Sub Paint(ByVal g As System.Drawing.Graphics, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal left As Boolean, ByVal top As Boolean, ByVal right As Boolean, ByVal bottom As Boolean) Implements FarPoint.Win.Spread.IFocusIndicatorRenderer.Paint
        Dim r As New SolidBrush(Color.Red)
        Dim b As New SolidBrush(Color.Blue)
        Dim gr As New SolidBrush(Color.DarkGreen)
        g.FillRectangle(r, x, y, 1, height)
        g.FillRectangle(gr, x, y, width, 1)
        g.FillRectangle(r, x + width - 1, y, 1, height)
        g.FillRectangle(b, x, y + height - 1, width, 1)
    End Sub
End Class

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Dim sfir As New FarPoint.Win.Spread.SolidFocusIndicatorRenderer(Color.Blue, 2)
    FpSpread1.FocusRenderer = sfir
    FpSpread1.FocusRenderer = New MyIndicator()
End Sub
See Also


FpSpread Class
FpSpread Members

User-Task Documentation

Customizing the Focus Indicator