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 Tree1 Dim a As EXTREELibCtl.VAlignmentEnum a = EXTREELibCtl.VAlignmentEnum.TopAlignment .BeginUpdate With .Items .LockedItemCount(a) = 1 Dim h As EXTREELibCtl.HITEM h = .LockedItem(a, 0) .CellCaption(h, 0) = "<b>locked</b> item" .CellCaptionFormat(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_tree.BeginUpdate(); CItems items = m_tree.GetItems(); items.SetLockedItemCount( 0 /*TopAlignment*/, 1); long i = items.GetLockedItem( 0 /*TopAlignment*/, 0 ); COleVariant vtItem(i), vtColumn( long(0) ); items.SetCellCaption( vtItem, vtColumn, COleVariant( "<b>locked</b> item" ) ); items.SetCellCaptionFormat( vtItem, vtColumn, 1/*exHTML*/ ); m_tree.EndUpdate();
The following VB.NET sample adds an item that's locked to the top side of the control:
With AxTree1 .BeginUpdate() With .Items .LockedItemCount(EXTREELib.VAlignmentEnum.TopAlignment) = 1 Dim i As Integer i = .LockedItem(EXTREELib.VAlignmentEnum.TopAlignment, 0) .CellCaption(i, 0) = "<b>locked</b> item" .CellCaptionFormat(i, 0) = EXTREELib.CaptionFormatEnum.exHTML End With .EndUpdate() End With
The following C# sample adds an item that's locked to the top side of the control:
axTree1.BeginUpdate(); EXTREELib.Items items = axTree1.Items; items.set_LockedItemCount(EXTREELib.VAlignmentEnum.TopAlignment, 1); int i = items.get_LockedItem(EXTREELib.VAlignmentEnum.TopAlignment, 0); items.set_CellCaption(i, 0, "<b>locked</b> item"); items.set_CellCaptionFormat(i, 0, EXTREELib.CaptionFormatEnum.exHTML); axTree1.EndUpdate();
The following VFP sample adds an item that's locked to the top side of the control:
with thisform.Tree1 .BeginUpdate() With .Items .LockedItemCount(0) = 1 .DefaultItem = .LockedItem(0, 0) .CellCaption(0, 0) = "<b>locked</b> item" .CellCaptionFormat(0, 0) = 1 && EXTREELib.CaptionFormatEnum.exHTML EndWith .EndUpdate() endwith