FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace : SheetStyleModelEventHandler Delegate |
'Declaration Public Delegate Sub SheetStyleModelEventHandler( _ ByVal sender As Object, _ ByVal e As SheetStyleModelEventArgs _ )
'Usage Dim instance As New SheetStyleModelEventHandler(AddressOf HandlerMethod)
public delegate void SheetStyleModelEventHandler( object sender, SheetStyleModelEventArgs e )
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(); }
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
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8