"dragEnabled","dropEnabled"

With the aid of these functions you can query whether the Drag and Drop was enabled for the elements of the tree widget. See also "setDragEnabled", "setDropEnabled".

Synopsis

bool shape.dragEnabled(string id);

bool shape.dropEnabled(string id);

Parameter

Parameter Description
shape Name of the object.
id The id of the element on that the "drop" occurred or "" for the outside elements of a tree.

Return Value

The return value TRUE means that Drag or Drop is enabled and the return value FALSE that Drag or Drop is disabled.

Description

With the aid of these functions you can query whether the Drag and Drop was enabled for the elements of the tree widget. See also "setDragEnabled", "setDropEnabled".

EXAMPLE

The following example enables the Drag and Drop at runtime for the element "MARIA" of the tree widget and then queries whether the Drag and Drop was enabled for the element.

main()
{
  //Add three columns
  TREE1.addColumn("NAME");
  TREE1.addColumn("SURNAME");
  TREE1.addColumn("ADDRESS");
  TREE1.appendItem("","WHOLE_NAME","WHOLE_NAME");
  //Add the first item
  TREE1.appendItem("WHOLE_NAME","MARIA","MARIA");
  //Enable Drag and Drop
  TREE1.setDragEnabled("MARIA", TRUE);
  TREE1.setDropEnabled("MARIA", TRUE);
  //Query whether the Drag and Drop was enabled 
  DebugN("Drag enabled:",TREE1.dragEnabled("MARIA"));
  DebugN("Drop enabled:", TREE1.dropEnabled("MARIA"));
}

Assignment

Tree Widget