Spread WPF Documentation
GrapeCity.Windows.SpreadSheet.Data Namespace / Cell Class / HorizontalAlignment Property
Example


In This Topic
    HorizontalAlignment Property (Cell)
    In This Topic
    Gets or sets the horizontal alignment of the cell contents.
    Syntax
    'Declaration
     
    <DefaultValueAttribute(Mono.Cecil.CustomAttributeArgument)>
    Public Property HorizontalAlignment As CellHorizontalAlignment
    'Usage
     
    Dim instance As Cell
    Dim value As CellHorizontalAlignment
     
    instance.HorizontalAlignment = value
     
    value = instance.HorizontalAlignment
    [DefaultValue(Mono.Cecil.CustomAttributeArgument)]
    public CellHorizontalAlignment HorizontalAlignment {get; set;}

    Property Value

    A CellHorizontalAlignment object that specifies the horizontal alignment for the cell. The default value is General.
    Example
    This example uses the HorizontalAlignment property.
    gcSpreadSheet1.CanCellOverflow = true;
    gcSpreadSheet1.Sheets[0].Cells[1, 2].HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Right;
    gcSpreadSheet1.Sheets[0].Cells[2, 2].HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Center;
    gcSpreadSheet1.Sheets[0].Cells[3, 2].HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Left;
    GcSpreadSheet1.CanCellOverflow = True
    GcSpreadSheet1.Sheets(0).Cells(1, 2).HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Right
    GcSpreadSheet1.Sheets(0).Cells(2, 2).HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Center
    GcSpreadSheet1.Sheets(0).Cells(3, 2).HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Left
    See Also