Type | Description | |||
Alignment as VAlignmentEnum | A VAlignmentEnum expression that indicates whether the locked item requested is on the top or bottom side of the control. | |||
Index as Long | A long expression that indicates the position of item being requested. | |||
HITEM | A long expression that indicates the handle of the locked item |
The following VB sample adds an item that's locked to the top side of the control:
With G2antt1 Dim a As EXG2ANTTLibCtl.VAlignmentEnum a = EXG2ANTTLibCtl.VAlignmentEnum.TopAlignment .BeginUpdate With .Items .LockedItemCount(a) = 1 Dim h As EXG2ANTTLibCtl.HITEM h = .LockedItem(a, 0) .CellValue(h, 0) = "<b>locked</b> item" .CellValueFormat(h, 0) = exHTML End With .EndUpdate End With
The following C++ sample adds an item that's locked to the top side of the control:
#include "Items.h" m_g2antt.BeginUpdate(); CItems items = m_g2antt.GetItems(); items.SetLockedItemCount( 0 /*TopAlignment*/, 1); long i = items.GetLockedItem( 0 /*TopAlignment*/, 0 ); COleVariant vtItem(i), vtColumn( long(0) ); items.SetCellValue( vtItem, vtColumn, COleVariant( "<b>locked</b> item" ) ); items.SetCellValueFormat( vtItem, vtColumn, 1/*exHTML*/ ); m_g2antt.EndUpdate();
The following VB.NET sample adds an item that's locked to the top side of the control:
With AxG2antt1 .BeginUpdate() With .Items .LockedItemCount(EXG2ANTTLib.VAlignmentEnum.TopAlignment) = 1 Dim i As Integer i = .LockedItem(EXG2ANTTLib.VAlignmentEnum.TopAlignment, 0) .CellValue(i, 0) = "<b>locked</b> item" .CellValueFormat(i, 0) = EXG2ANTTLib.CaptionFormatEnum.exHTML End With .EndUpdate() End With
The following C# sample adds an item that's locked to the top side of the control:
axG2antt1.BeginUpdate(); EXG2ANTTLib.Items items = axG2antt1.Items; items.set_LockedItemCount(EXG2ANTTLib.VAlignmentEnum.TopAlignment, 1); int i = items.get_LockedItem(EXG2ANTTLib.VAlignmentEnum.TopAlignment, 0); items.set_CellValue(i, 0, "<b>locked</b> item"); items.set_CellValueFormat(i, 0, EXG2ANTTLib.CaptionFormatEnum.exHTML); axG2antt1.EndUpdate();
The following VFP sample adds an item that's locked to the top side of the control:
with thisform.G2antt1 .BeginUpdate() With .Items .LockedItemCount(0) = 1 .DefaultItem = .LockedItem(0, 0) .CellValue(0, 0) = "<b>locked</b> item" .CellValueFormat(0, 0) = 1 && EXG2ANTTLib.CaptionFormatEnum.exHTML EndWith .EndUpdate() endwith