Spread Windows Forms 7.0 Product Documentation
SheetAxisModelEventType Enumeration
Example  See Also  Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace : SheetAxisModelEventType Enumeration


Glossary Item Box

Specifies the type of Change event that has occurred for an axis model for the sheet.

Syntax

Visual Basic (Declaration) 
Public Enum SheetAxisModelEventType 
   Inherits System.Enum
Visual Basic (Usage)Copy Code
Dim instance As SheetAxisModelEventType
C# 
public enum SheetAxisModelEventType : System.Enum 

Members

MemberDescription
AppearanceItemsUpdatedIndicates that items have changed in a way that does not affect the layout (for example, the label or the sort indicator has changed)
ItemsAddedIndicates that items have been added to the model
ItemsRemovedIndicates that items have been removed from the model
LayoutItemsUpdatedIndicates that items have changed in a way that may affect the layout (for example, the size or visible state has changed)
ModelUpdatedIndicates that the entire model has changed

Example

This example causes the Changed event to occur for the SheetAxisModel and the type for the event is returned to a list box.
C#Copy Code
FarPoint.Win.Spread.Model.ISheetAxisModel isam;

private void Form1_Load(object sender, System.EventArgs e)
{
    isam = fpSpread1.ActiveSheet.Models.ColumnAxis;
    this.isam.Changed += new FarPoint.Win.Spread.Model.SheetAxisModelEventHandler(this.isam_Changed);
}

private void menuItem1_Click(object sender, System.EventArgs e)
{
    isam = fpSpread1.ActiveSheet.Models.ColumnAxis;
    isam.SetSize(0, 240);
}

private void isam_Changed(object sender, FarPoint.Win.Spread.Model.SheetAxisModelEventArgs e)
{
    switch (e.Type)
            {
                case FarPoint.Win.Spread.Model.SheetAxisModelEventType.LayoutItemsUpdated:
                    listBox1.Items.Add(e.Type.ToString());
                    break;
                case FarPoint.Win.Spread.Model.SheetAxisModelEventType.ItemsAdded:
                    listBox1.Items.Add(e.Type.ToString());
                    break;
                case FarPoint.Win.Spread.Model.SheetAxisModelEventType.AppearanceItemsUpdated:
                    listBox1.Items.Add(e.Type.ToString());
                    break;
                case FarPoint.Win.Spread.Model.SheetAxisModelEventType.ItemsRemoved:
                    listBox1.Items.Add(e.Type.ToString());
                    break;
                case FarPoint.Win.Spread.Model.SheetAxisModelEventType.ModelUpdated:
                    listBox1.Items.Add(e.Type.ToString());
                    break;
            }
}
Visual BasicCopy Code
Friend WithEvents isam As FarPoint.Win.Spread.Model.ISheetAxisModel

Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
    isam = FpSpread1.ActiveSheet.Models.ColumnAxis
    isam.SetSize(0, 240)
End Sub

Private Sub isam_Changed(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.Model.SheetAxisModelEventArgs) Handles isam.Changed
    Select Case e.Type
    Case FarPoint.Win.Spread.Model.SheetAxisModelEventType.LayoutItemsUpdated
        ListBox1.Items.Add(e.Type.ToString())
    Case FarPoint.Win.Spread.Model.SheetAxisModelEventType.ItemsAdded
        ListBox1.Items.Add(e.Type.ToString())
    Case FarPoint.Win.Spread.Model.SheetAxisModelEventType.AppearanceItemsUpdated
        ListBox1.Items.Add(e.Type.ToString())
    Case FarPoint.Win.Spread.Model.SheetAxisModelEventType.ItemsRemoved
        ListBox1.Items.Add(e.Type.ToString())
    Case FarPoint.Win.Spread.Model.SheetAxisModelEventType.ModelUpdated
        ListBox1.Items.Add(e.Type.ToString())
End Select
End Sub

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Win.Spread.Model.SheetAxisModelEventType

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.