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


Glossary Item Box

Specifies the horizontal position of the cell or column in the component.

Syntax

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

Members

MemberDescription
CenterPositions the cell or column in the center
LeftPositions the cell or column to the left
NearestPositions the cell or column to the nearest edge
RightPositions the cell or column to the right

Remarks

For vertical position of the cell or row, refer to the VerticalPosition enumeration.

When using methods in FpSpread or SheetView class to move the cell into the display, if the specified cell is already visible, then the Nearest parameter does nothing. If the specified cell is not visible then the sheet is scrolled just enough to make the specified cell visible. For example, setting the ActiveRowIndex and ActiveColumnIndex properties scrolls the sheet. Setting the active cell to a cell that is outside the displayed area scrolls the cell into view. Setting the active cell to a cell already in the view does nothing since the cell is already visible. The Nearest parameter only changes or moves the cells in the display if the specified cell is not displayed.

Example

C#Copy Code
FarPoint.Win.Spread.FpSpread fpSpread1 = new FarPoint.Win.Spread.FpSpread();
FarPoint.Win.Spread.SheetView shv = new FarPoint.Win.Spread.SheetView();
fpSpread1.Location = new Point(10, 10);
fpSpread1.Height = 200;
fpSpread1.Width = 400;
Controls.Add(fpSpread1);
fpSpread1.Sheets.Add(shv);
fpSpread1.ActiveSheet.SetActiveCell(15, 15);
fpSpread1.ShowActiveCell(FarPoint.Win.Spread.VerticalPosition.Center, FarPoint.Win.Spread.HorizontalPosition.Center);
Visual BasicCopy Code
Dim fpSpread1 As New FarPoint.Win.Spread.FpSpread()
Dim shv As New FarPoint.Win.Spread.SheetView()
fpSpread1.Location = New Point(10, 10)
fpSpread1.Height = 200
fpSpread1.Width = 400
Controls.Add(fpSpread1)
fpSpread1.Sheets.Add(shv)
fpSpread1.ActiveSheet.SetActiveCell(15, 15)
fpSpread1.ShowActiveCell(FarPoint.Win.Spread.VerticalPosition.Center, FarPoint.Win.Spread.HorizontalPosition.Center)

Inheritance Hierarchy

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

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.