Programme SAP SAP_CONTROL_TEST - Example: Simple Tree Control (with Documentation)

Description
The SAPSIMPLE_TREE_CONTROL_DEMO program shows how you use the simpletree control (instances of the CL_GUI_SIMPLE_TREE class).
Each node in the simple tree control consists of a folder or sheet ofpaper icon and a text. Each node is described using the Dictionarystructure TREEV_NODE beschrieben. Users must include this structure ina structure of their own; this structure must contain a field with thename 'TEXT'.

Events
The frame on the right side of the screen displays events that haveoccurred. You can raise the following events in the example program:

node double click
A node ha been double-clicked

expand no children
A node can show a + beside its folder or sheet of paper icon, eventhough there are no subnodes available in the control (set the EXPANDERfield in TREEV_NODE). If the user clicks on such a node, the EXPAND_NCevent is raised. In the example, the Child1 node has thisattribute. The example program reacts to this event by adding to newnodes to the control (New1 and New2).