ItemExpandedState - TreeView
Returns whether an item is currently expanded
Type: Function
Return Data Type: Integer
Parameters
| Parameter | Type | Description |
|---|---|---|
| hItem | Handle | Item handle |
Syntax
Function ItemExpandedState Handle hItem Returns Integer
Call Example
Get ItemExpandedState hItem to IntegerVariable
Description
Returns a Boolean value indicating whether an item is currently expanded. This function is only appropriate for items that have children. You can determine whether an item has any child items by calling ItemChildCount.
Sample
This sample shows a function that checks whether a TreeView item is expanded or not, taking into account whether it has children or not.
Function IsItemExpanded Handle hItem Returns Boolean
Boolean bHasChildren bIsExpanded
Get ItemChildCount hItem to bHasChildren
If (bHasChildren) Begin
Get ItemExpandedState hItem to bIsExpanded
End
Function_Return bIsExpanded
End_Function
Return Value
If no child items exist, it will return False.