Controls the appearance of the expand and collapse image for the item
Member of List List Item (PRIM_LIST.ListItem)
Data Type - Enumeration
The HasChildren property is used to control the appearance of the expand/collapse image for an item. By default the control will show the correct icon for an item. If there are no child items, no expand image will be shown. When building trees on demand it is necessary to show the expand item even though there are no child items yet. This means that the item can expand, and the HasChildren can be tested to see whether there is a need to load the branch.
Enum Value | Description |
---|---|
No | Hide the expand/collapse image. The item cannot be expanded. |
Unknown | Show the expand/collapse image. The item can be expanded. |
Yes | Show the expand/collapse image. The item can be expanded. |
In this example of how you might handle dynamically loading a tree, if there are already child items for an expanding item, they are delete and the branch reloaded.
Evtroutine Handling(#List.ItemExpanding) Case (#List.CurrentItem.HasChildren) When (= Unknown) #Com_owner.LoadBranch When (= Yes) #List.CurrentItem.DeleteAll #Com_owner.LoadBranch Endcase Endroutine
LANSA Version 15, April 2020