Has-Children
This property is used to set or inquire whether the item identified by the Item property has children.
When set to a non-zero value, the item is marked as if it had children, even if it does not actually contain any item. This way, when the user tries to expand it, the MSG-TV-EXPANDING and MSG-TV-EXPANDED events are fired. This technique is used to handle a Tree-View control with items loaded on demand.
When an item is added, the HAS-CHILDREN property of its parent is automatically set to 1.
When an item is emptied, using the Item-To-Empty property, its HAS-CHILDREN property is automatically set to 0.
 
Example - Add a parent item to the tree-view specifying that it will have children. Later, check if that item has children
       working-storage section.
       77 w-item handle.
       77 hc-flg pic 9.
       ...
       procedure division.
       ...
           modify screen-1-tv-1 parent 0
                       item-to-add "Parent" giving w-item
                       has-children 1
       ...
           inquire screen-1-tv-1(w-item) has-children hc-flg