Bambookit Home    Bambookit GUI Tutorial

II. GUI Basics

Chapter 8. Prebuilt Widgets

Tree View

Tree View Drag and Drop

Tree View Control. In this example we will demonstrate how to drag and drop elements into a tree node.

Examples - Drag and Drop

A simple XML script for accepting droppable widgets into a tree node

In the display below, the left side contains a list box, with two nodes that are drop targets. Their drop target is set to 2. This means that a copy is created of the original drag source in the target tree node. Try it

When a source drag and drop node is 'copied' to the target node it creates copies of all its children widgets as well. Note the group box, it contains 3 checkboxes, check the first checkbox and then drag the group box into the node. You will notice that the first checkbox retains its value. Now check the second group box IN the tree node. The original groupbox does NOT get modified since a copy was created.

When drag and drop occurs in a tree (or listbox) you will note the items width is modified to fit the listbox width but the height remains unmodified.