Type | Description | |||
Item as Variant | A long expression that indicates the handle of the item. | |||
ColIndex as Variant | A long expression that indicates the column's index, a string expression that indicates the column's key or the column's caption. | |||
AlignmentEnum | An AlignmentEnum expression that indicates the alignment of the cell's caption. |
The following VB sample right aligns the focused cell:
With Grid1.Items .CellHAlignment(.FocusItem, Grid1.FocusColumnIndex) = AlignmentEnum.RightAlignment End With
The following C++ sample right aligns the focused cell:
#include "Items.h" CItems items = m_grid.GetItems(); items.SetCellHAlignment( COleVariant( items.GetFocusItem() ), COleVariant( (long)m_grid.GetFocusColumnIndex() ), 2 /*RightAlignment*/ );
The following VB.NET sample right aligns the focused cell:
With AxGrid1.Items .CellHAlignment(.FocusItem, AxGrid1.FocusColumnIndex) = EXGRIDLib.AlignmentEnum.RightAlignment End With
The following C# sample right aligns the focused cell:
axGrid1.Items.set_CellHAlignment(axGrid1.Items.FocusItem, axGrid1.FocusColumnIndex, EXGRIDLib.AlignmentEnum.RightAlignment);
The following VFP sample right aligns the focused cell:
with thisform.Grid1.Items .DefaultItem = .FocusItem .CellHAlignment(0,thisform.Grid1.FocusColumnIndex) = 2 && RightAlignment endwith