SAP Program CFW_WORKSHOP_DRAGDROP - Drag and Drop Demonstration Program with Textedit and Tree Control

Description
Program SAPSIMPLE_TREE_CONTROL_DEMO demonstrates how to use a simpletreen control (class CL_GUI_SIMPLE_TREE).
A node of a simple tree control consists of a folder or leaf symbol anda text. Each node is described by the ABAP Dictionary structureTREEV_NODE. To use this structure, you must define a second structureof your own in which you include TREEV_NODE and define a field called'TEXT'.

Events
The box on the right-hand side of the screen displays events as theyoccur. The following events can be triggered in the demonstration:

node double click
Double-click on a node.

expand no children
It is possible to make a node display a plus sign in its folder symboleven though it has no child nodes (EXPANDER field set in TREEV_NODE).If the user clicks one of these nodes, the event EXPAND_NC istriggered. In the example, the node "Child1" has this attribute. Theprogram reacts to the event by passing two new nodes to the control(New1 and New2).