Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / StyleInfo Class / VerticalAlignment Property
Example


In This Topic
    VerticalAlignment Property (StyleInfo)
    In This Topic
    Gets or sets the vertical alignment of contents of the cell for the style.
    Syntax
    'Declaration
     
    Public Overridable Property VerticalAlignment As CellVerticalAlignment
    'Usage
     
    Dim instance As StyleInfo
    Dim value As CellVerticalAlignment
     
    instance.VerticalAlignment = value
     
    value = instance.VerticalAlignment
    public virtual CellVerticalAlignment VerticalAlignment {get; set;}

    Property Value

    CellVerticalAlignment setting that determines the vertical alignment for cell contents
    Example
    FarPoint.Win.Spread.StyleInfo si = new FarPoint.Win.Spread.StyleInfo();
    DialogResult dlg;
    si.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Bottom;
    fpSpread1.ActiveSheet.DefaultStyle = si;
    dlg = MessageBox.Show("Reset the alignment?");
    if (dlg == DialogResult.OK)
    {
    si.ResetVerticalAlignment();
    fpSpread1.ActiveSheet.DefaultStyle = si;
    }
    
    Dim si As New FarPoint.Win.Spread.StyleInfo
    Dim dlg As DialogResult
    si.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Bottom
    fpSpread1.ActiveSheet.DefaultStyle = si
    dlg = MessageBox.Show("Reset the alignment?")
    If dlg = DialogResult.OK Then
    si.ResetVerticalAlignment()
    fpSpread1.ActiveSheet.DefaultStyle = si
    End If
    
    See Also