Version 6.3.8 für Windows
 —  Dialog Component Reference  —

ENUM-CHILDREN Action

This document covers the following topics:


Description

Enumerates the first or next direct or indirect child object belonging to a specified root object. The enumeration sequence id depth first, with parents being enumerated before their children.

The action may be called repeatedly, in order to enumerate all child objects belonging to a given root (ancestor) object. For the first call, both parameters should be set to the handle of the root object. The value NULL-HANDLE is returned by the output parameter if enumeration is complete.

Top of page

Parameters

Name/Data Type Explanation
Root

(HANDLE OF GUI )

Input

Handle of object whose direct and indirect children are being enumerated.

Current

(HANDLE OF GUI )

Input/Output

On input, the handle of the root object if this is the first call to this action (whereupon the handle of the first child object will be returned), otherwise the object handle returned by the previous call to this action (whereupon the handle of the next child object will be returned). On output, the handle of the first or next child object (as described above), or NULL-HANDLE if enumeration is complete.

Response (I4) Output

Natural error (if applicable).

Example:

 
DEFINE DATA LOCAL 1 
 #TV-1 HANDLE OF TREEVIEW 1 
 #ITEM HANDLE OF GUI 
END-DEFINE * /*
 Output labels of all tree view items: 
  #ITEM := 
  #TV-1 REPEAT PROCESS GUI ACTION
  ENUM-CHILDREN WITH #TV-1 #ITEM GIVING *ERROR IF #ITEM <> NULL-HANDLE
  WRITE #ITEM.STRING (AL=72) 
  ELSE ESCAPE BOTTOM 
 END-IF 
END-REPEAT 

Top of page