Spread Windows Forms 6.0 Product Documentation
SheetStyleModelEventHandler Delegate
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace : SheetStyleModelEventHandler Delegate


sender
e

Glossary Item Box

Handles the Changed event in the style model of the sheet.

Syntax

Visual Basic (Declaration) 
Public Delegate Sub SheetStyleModelEventHandler( _
   ByVal sender As Object, _
   ByVal e As SheetStyleModelEventArgs _
) 
Visual Basic (Usage)Copy Code
Dim instance As New SheetStyleModelEventHandler(AddressOf HandlerMethod)
C# 
public delegate void SheetStyleModelEventHandler( 
   object sender,
   SheetStyleModelEventArgs e
)

Parameters

sender
e

Remarks

For information on the event, refer to the Changed event.

Example

This example creates the handler for the model.
C#Copy Code
FarPoint.Win.Spread.Model.BaseSheetStyleModel model; 
 
model = (FarPoint.Win.Spread.Model.BaseSheetStyleModel)fpSpread1.ActiveSheet.Models.Style; 
 
model.Changed += new FarPoint.Win.Spread.Model.SheetStyleModelEventHandler(modelStyleModelChanged); 
     
private void button1Click(object sender, System.EventArgs e) 
{ 
    FarPoint.Win.Spread.StyleInfo sInfo = new FarPoint.Win.Spread.StyleInfo(); 
    sInfo.BackColor = Color.Teal; 
    model.AltRowCount = 2; 
    model.SetDirectAltRowInfo(0, sInfo); 
} 
 
private void modelStyleModelChanged(object sender, FarPoint.Win.Spread.Model.SheetStyleModelEventArgs e) 
{ 
    textBox1.Text = e.ColumnCount.ToString(); 
} 
Visual BasicCopy Code
Friend WithEvents model As FarPoint.Win.Spread.Model.BaseSheetStyleModel

model = FpSpread1.ActiveSheet.Models.Style

Dim h As FarPoint.Win.Spread.Model.SheetStyleModelEventHandler = AddressOf modelStyleModelChanged
AddHandler model.Changed, h

Private Sub Button1Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim sInfo As New FarPoint.Win.Spread.StyleInfo
    sInfo.BackColor = Color.Teal
    model.AltRowCount = 2
    model.SetDirectAltRowInfo(0, sInfo)
End Sub

Private Sub modelStyleModelChanged(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.Model.SheetStyleModelEventArgs)
    TextBox1.Text = e.ColumnCount.ToString()
End Sub

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.