Spread Windows Forms 7.0 Product Documentation
HorizontalAlignment Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > AlternatingRow Class : HorizontalAlignment Property


Glossary Item Box

Gets or sets the horizontal alignment for text in the cells in this alternating row.

Syntax

Visual Basic (Declaration) 
Public Property HorizontalAlignment As CellHorizontalAlignment
Visual Basic (Usage)Copy Code
Dim instance As AlternatingRow
Dim value As CellHorizontalAlignment
 
instance.HorizontalAlignment = value
 
value = instance.HorizontalAlignment
C# 
public CellHorizontalAlignment HorizontalAlignment {get; set;}

Property Value

CellHorizontalAlignment object containing the horizontal alignment for cell contents

Remarks

To create alternating rows, first set the AlternatingRows.Count property to specify the number of alternating row patterns, then set the properties for each pattern.

Example

This example specifies the text alignment for the alternating row.
C#Copy Code
FarPoint.Win.Spread.AlternatingRow altrow;
altrow = fpSpread1.ActiveSheet.AlternatingRows[0];
altrow.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
altrow.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Top;
fpSpread1.ActiveSheet.Rows[0].Height = 80;
fpSpread1.ActiveSheet.Columns[0].Width = 120;
fpSpread1.ActiveSheet.Cells[0, 0].Text = "Alignment";
Visual BasicCopy Code
Dim altrow As FarPoint.Win.Spread.AlternatingRow
altrow = FpSpread1.ActiveSheet.AlternatingRows(0)
altrow.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right
altrow.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Top
FpSpread1.ActiveSheet.Rows(0).Height = 80
FpSpread1.ActiveSheet.Columns(0).Width = 120
FpSpread1.ActiveSheet.Cells(0, 0).Text = "Alignment"

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

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