Spread for ASP.NET 13 Product Documentation
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / SheetStyleProperty Class / HorizontalAlign Field
Example


In This Topic
    HorizontalAlign Field (SheetStyleProperty)
    In This Topic
    Represents the HorizontalAlign property (index of 6) for the horizontal alignment of the sheet style.
    Syntax
    'Declaration
     
    Public Shared ReadOnly HorizontalAlign As SheetStyleProperty
    'Usage
     
    Dim value As SheetStyleProperty
     
    value = SheetStyleProperty.HorizontalAlign
    public static readonly SheetStyleProperty HorizontalAlign
    Example
    FarPoint.Web.Spread.StyleInfo si = new FarPoint.Web.Spread.StyleInfo("DataAreaDefault");
    si.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Right;
    si.VerticalAlign = System.Web.UI.WebControls.VerticalAlign.Bottom;
    FpSpread1.ActiveSheetView.DefaultStyle = si;
    bool b, b1;
    if(IsPostBack)
    {
        b = si.IsPropertySet(FarPoint.Web.Spread.SheetStyleProperty.HorizontalAlign);
        b1 = si.IsPropertySet(FarPoint.Web.Spread.SheetStyleProperty.VerticalAlign);
        if (b & b1)
        {
            Response.Write("The alignment has been set.");
        }
    }
    
    Dim s As FarPoint.Web.Spread.SheetStyleProperty
    Dim si As New FarPoint.Web.Spread.StyleInfo("DataAreaDefault")
    si.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Right
    si.VerticalAlign = System.Web.UI.WebControls.VerticalAlign.Bottom
    FpSpread1.ActiveSheetView.DefaultStyle = si
    Dim b, b1 As Boolean
    If IsPostBack Then
        b = si.IsPropertySet(s.HorizontalAlign)
        b1 = si.IsPropertySet(s.VerticalAlign)
        If b And b1 Then
            Response.Write("The alignment has been set.")
        End If
    End If
    See Also