SftTree/OCX 7.0

SftTreeItems.Current Property

Softel vdm, Inc.

Defines the current item (caret location).

Syntax       

Get

VB.NET

ItemIndex = object.Current  As Integer

VB

ItemIndex = object.Current  As Long

C#.NET

int ItemIndex = object.Current;

VC++

long ItemIndex = object->Current;
long ItemIndex = object->GetCurrent();

C

HRESULT object->get_Current(long* ItemIndex);

Delphi

ItemIndex := object.Current   : Integer;

Put

VB.NET

object.Current = ItemIndex  As Integer

VB

object.Current = ItemIndex  As Long

C#.NET

int object.Current = ItemIndex;

VC++

long object->Current = ItemIndex;
void object->PutCurrent(long ItemIndex);

C

HRESULT object->put_Current(long ItemIndex);

Delphi

object.Current := ItemIndex   : Integer;

object

A SftTreeItems object.

ItemIndex

Defines the current item (caret location).

Comments

The Current property defines the current item (caret location).

The Current property describes the current item, which is the item that has the focus rectangle.  This item is not necessarily also selected.  The current item is described by the Current property, the currently selected item is described by the Items.Selection property.  These are not necessarily the same even in a single-selection tree control (see Items.NoSelection property).

When the user changes the current item (caret location), the CaretChange event occurs.  The SelectionChange event occurs when the selection changes.

If the tree control is empty, the Current property returns -1.  An application must set the property to a valid, existing item.  It cannot set it to -1.

The focus rectangle can be hidden using the Items.ShowFocusRectangle property. 

See Also  SftTreeItems Object | Object Hierarchy


Feedback / comments / error reports for this topic
© 2015 - Softel vdm, Inc. - www.softelvdm.com