TreeItem Interface Reference

A TreeItem object represents one item in an TreeView. More...

List of all members.

Public Member Functions

 Add ([in] BSTR Text,[in, defaultvalue(-1)] LONG ImageIndex,[in, defaultvalue(-1)] LONG SelectedImageIndex,[out, retval] IDispatch **pItem)
 This method creates a new child TreeItem.
 Insert ([in] LONG Index,[in] BSTR Text,[in, defaultvalue(-1)] LONG ImageIndex,[in, defaultvalue(-1)] LONG SelectedImageIndex,[out, retval] IDispatch **pItem)
 Use this method to insert a new child item to the collection.
 Remove ([in, defaultvalue(TREEVIEW_THISITEM)] LONG Index)
 Call this method to remove one item from the collection.
 Clear ()
 Removes all of the items from the collection.
 Expand ([in, defaultvalue(FALSE)] VARIANT_BOOL Recurse)
 Expands the item.
 Collapse ()
 Collapses the item.
 EditLabel ()
 Starts editing the item.
 Sort ([in, defaultvalue(TRUE)] VARIANT_BOOL Recurse)
 This method sorts the child items.
 MakeVisible ()
 Ensures that the item is visible.

Properties

LPUNKNOWN R _NewEnum []
 Returns the enumerator for the collection.
VARIANT R Item [[in] long Index] []
 Returns the specified item in the collection.
long R Count []
 Returns the number of items in the collection.
BSTR RW Text []
 Returns or sets the text of the object.
LONG RW ImageIndex []
 The image index in the TreeView's ImageList.
LONG RW SelectedImageIndex []
 The image index in the TreeView's ImageList that used when the item is selected.
VARIANT_BOOL RW Selected []
 Gets or sets the selection state of the item.
VARIANT_BOOL RW Expanded []
 The Expanded property is a Boolean value that indicates that the item is expanded or not.
VARIANT_BOOL RW Bold []
 The Bold property is a Boolean value that indicates that the item is marked with bold font.
VARIANT_BOOL RW Checked []
 The Checked property is a Boolean value that indicates that the item is checked or not.
VARIANT_BOOL R HasChildren []
 The HasChildren property is a Boolean value that indicates that the item has child items.
IDispatch *R Parent []
 Use the Parent property to get the parent item of the item.
IDispatch *R NextSibling []
 Use the Parent property to get the next sibling item of the item.
IDispatch *R PrevSibling []
 Use the Parent property to get the previous sibling item of the item.
IDispatch *R FirstChild []
 Use the Parent property to get the first child item of the item.
IDispatch *R LastChild []
 Use the Parent property to get the last child item of the item.
VARIANT RW UserData []
 The UserData property is provided for the convenience of developers.
BSTR RW Hint []
 Returns or sets the hint of the object.
IDispatch *RW Font []
 Returns or sets the Font for the item.
ULONG RW TextBkColor []
 Returns or sets the background color for the item.


Detailed Description

A TreeItem object represents one item in an TreeView.

The TreeItem object is an collection of an other TreeView.


Member Function Documentation

Add ( [in] BSTR  Text,
[in, defaultvalue(-1)] LONG  ImageIndex,
[in, defaultvalue(-1)] LONG  SelectedImageIndex,
[out, retval] IDispatch **  pItem 
)

This method creates a new child TreeItem.

Parameters:
Text Specifies the title of the TreeItem.
ImageIndex Specifies the image index of the TreeItem.
SelectedImageIndex Specifies the image index of the TreeItem that used when the item is selected.
Return values:
pItem TreeItem object

Clear (  ) 

Removes all of the items from the collection.

Collapse (  ) 

Collapses the item.

EditLabel (  ) 

Starts editing the item.

Expand ( [in, defaultvalue(FALSE)] VARIANT_BOOL  Recurse  ) 

Expands the item.

Parameters:
Recurse Recurse expand.

Insert ( [in] LONG  Index,
[in] BSTR  Text,
[in, defaultvalue(-1)] LONG  ImageIndex,
[in, defaultvalue(-1)] LONG  SelectedImageIndex,
[out, retval] IDispatch **  pItem 
)

Use this method to insert a new child item to the collection.

Parameters:
Index The index where the item are to be inserted.
Text Specifies the title of the TreeItem.
ImageIndex Specifies the image index of the TreeItem.
SelectedImageIndex Specifies the image index of the TreeItem that used when the item is selected.
Return values:
pItem TreeItem object

MakeVisible (  ) 

Ensures that the item is visible.

Scrolls the parent TreeView control and expands an items if required.

Remove ( [in, defaultvalue(TREEVIEW_THISITEM)] LONG  Index  ) 

Call this method to remove one item from the collection.

Parameters:
Index The index of the element to remove. If Index = TREEVIEW_THISITEM then the item removes itself.

Sort ( [in, defaultvalue(TRUE)] VARIANT_BOOL  Recurse  ) 

This method sorts the child items.

Parameters:
Recurse Recurse sorting.


Property Documentation

LPUNKNOWN R _NewEnum

Returns the enumerator for the collection.

VARIANT_BOOL RW Bold

The Bold property is a Boolean value that indicates that the item is marked with bold font.

VARIANT_BOOL RW Checked

The Checked property is a Boolean value that indicates that the item is checked or not.

long R Count

Returns the number of items in the collection.

VARIANT_BOOL RW Expanded

The Expanded property is a Boolean value that indicates that the item is expanded or not.

IDispatch* R FirstChild

Use the Parent property to get the first child item of the item.

IDispatch* RW Font

Returns or sets the Font for the item.

Property CustomDraw of the parent TreeView control must be "TRUE".

Since:
1.1.12.

VARIANT_BOOL R HasChildren

The HasChildren property is a Boolean value that indicates that the item has child items.

BSTR RW Hint

Returns or sets the hint of the object.

InfoTip must be "TRUE".

Since:
1.1.10.

LONG RW ImageIndex

The image index in the TreeView's ImageList.

VARIANT R Item[[in] long Index] (  ) 

Returns the specified item in the collection.

IDispatch* R LastChild

Use the Parent property to get the last child item of the item.

IDispatch* R NextSibling

Use the Parent property to get the next sibling item of the item.

IDispatch* R Parent

Use the Parent property to get the parent item of the item.

IDispatch* R PrevSibling

Use the Parent property to get the previous sibling item of the item.

VARIANT_BOOL RW Selected

Gets or sets the selection state of the item.

LONG RW SelectedImageIndex

The image index in the TreeView's ImageList that used when the item is selected.

BSTR RW Text

Returns or sets the text of the object.

ULONG RW TextBkColor

Returns or sets the background color for the item.

Property CustomDraw of the parent TreeView control must be "TRUE".

Since:
1.1.12.

VARIANT RW UserData

The UserData property is provided for the convenience of developers.

It can be used for storing an additional value.


WSO 1.1 Documentation. Date modified:Wed Aug 12 18:13:20 2015. (C) Veretennikov A. B. 2004-2015