Spread Windows Forms 6.0 Product Documentation
CellHorizontalAlignment Enumeration
Example  See Also  Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace : CellHorizontalAlignment Enumeration


Glossary Item Box

Specifies the horizontal alignment of the cell contents.

Syntax

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

Members

MemberDescription
CenterCenters the contents in the cell horizontally
DistributedIndicates the text is inserted some whitespaces to make the text fill the special area.
GeneralAligns the cell contents according to the cell's interpretation of the contents
JustifyIndicates the text is inserted some whitespaces to make the text fill the special area.
LeftAligns the cell contents to the left
RightAligns the cell contents to the right

Example

C#Copy Code
using FarPoint.Win.Spread;
using FarPoint.Win;

private void Form1_Load(object sender, System.EventArgs e)
{
     FarPoint.Win.Spread.Cell acell;
     acell = fpSpread1.ActiveSheet.Cells[0, 0];
     fpSpread1.ActiveSheet.Cells[0, 0].Text = "Alignment";
     acell.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
     acell.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Top;
     acell.Locked = true;
     fpSpread1.ActiveSheet.Rows[0].Height = 80;
}
Visual BasicCopy Code
Imports FarPoint.Win.Spread
Imports FarPoint.Win

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
     Dim acell As FarPoint.Win.Spread.Cell
     acell = FpSpread1.ActiveSheet.Cells(0, 0)
     FpSpread1.ActiveSheet.Cells(0, 0).Text = "Alignment"
     acell.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right
     acell.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Top
     acell.Locked = True
     FpSpread1.ActiveSheet.Rows(0).Height = 80
End Sub

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Win.Spread.CellHorizontalAlignment

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.