"clearSelection"

Removes the marking of all items in a graphical object.

Synopsis

shape.clearSelection();

Parameter

Parameter Description
shape object name

Description

clearSelection removes all selections in a graphical object (cf. Figure 1).

Figure 1. ClearSelection - Before/After

Example

In this example multiple items are added to a tree widget node (WHOLE NAME) and afterwards the selection mode is set to multi select. With the function RemoveSelection all selections are removed.

main()
{
  //Add three columns
  TREE1.addColumn("SURNAME");
  TREE1.addColumn("FIRST NAME");
  TREE1.addColumn("ADDRESS");
  //append the item WHOLE NAME
  TREE1.appendItemNC("","WHOLE NAME","WHOLE_NAME");
  //append three leaves to WHOLE NAME
  TREE1.appendItemNC("WHOLE NAME","MUELLER","Mueller");
  TREE1.appendItemNC("WHOLE NAME","SCHMIDT","Schmidt");
  TREE1.appendItemNC("WHOLE NAME","KAUFMANN","Kaufmann");
  //Set the text for the leave node column "NAME"
  TREE1.setText("MUELLER",1,"Maria");
  TREE1.setText("SCHMIDT",1,"Anna");
  TREE1.setText("KAUFMANN",1,"Jan");
  //Set the text for the leave node column "ADDRESS"
  TREE1.setText("MUELLER",2,"Hauptstr. 1");
  TREE1.setText("SCHMIDT",2,"Wienerstr. 10");
  TREE1.setText("KAUFMANN",2,"Nebenstr. 100");
  //Sets the SelectionMode to multi select.
  TREE1.selectionMode(1);
}
...
  RemoveSelection()
{
  TREE1.clearSelection(); //Removes all selections inside the tree widget.
}

Assignment

Tree Widget, SelectionList