Spread Windows Forms 12.0 Product Documentation
AlignHorz Property (PSObject)

FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.DrawingSpace Namespace > PSObject Class : AlignHorz Property
Gets or sets the horizontal alignment of the contents of the element.
Public Overrides Property AlignHorz As HorizontalAlignment
Dim instance As PSObject
Dim value As HorizontalAlignment
instance.AlignHorz = value
value = instance.AlignHorz
public override HorizontalAlignment AlignHorz {get; set;}

Property Value

HorizontalAlignment setting that determines the alignment
This property is available at run time only. The alignment area for a non-rectangle shape in Spread is the shape boundary.
This example aligns the text.
fpSpread1.Sheets[0].Cells[1, 3].Text = "Test";
FarPoint.Win.Spread.DrawingSpace.RectangleShape a = new FarPoint.Win.Spread.DrawingSpace.RectangleShape();
a.AlignHorz = FarPoint.Win.HorizontalAlignment.Right;
a.AlignVert = FarPoint.Win.VerticalAlignment.Bottom;
a.BackColor = Color.Blue;
a.Text = "Test";
a.CanRenderText = true;
fpSpread1.ActiveSheet.AddShape(a, 1, 1);
fpSpread1.Sheets(0).Cells(1, 3).Text = "Test"
Dim a As New FarPoint.Win.Spread.DrawingSpace.RectangleShape()
a.AlignHorz = FarPoint.Win.HorizontalAlignment.Right
a.AlignVert = FarPoint.Win.VerticalAlignment.Bottom
a.BackColor = Color.Yellow
a.Text = "Test"
a.CanRenderText = True
fpSpread1.ActiveSheet.AddShape(a, 1, 1)
See Also


PSObject Class
PSObject Members