"getToolTip"

Returns the defined tooltip text of an item in a tree widget.

Synopsis

shape.getToolTip(string id, int column);

Parameters

Parameter Description
shape Name of the object
id ID (defined name) of the item that should be returned.
column ID of the column

Description

Returns the defined tooltip text of an item in a tree widget.

Example

Shows the tooltip texts for the items of the first column (here, for example, the personnel number, see figure below),

main()
{
  //Adding three columns
  TREE1.addColumn("Surname");
  TREE1.addColumn("First name");
  TREE1.addColumn("Address");
  TREE1.addColumn("Personnel number");
  //Appending the item "Data"
  TREE1.appendItemNC("","DATA_","Data");
  //Appending three sub-items
  TREE1.appendItemNC("DATA_","SMITH","Smith");
  TREE1.setToolTip("SMITH", 0, "12345");
  TREE1.appendItemNC("DATA_","DOE","Doe");
  TREE1.setToolTip("DOE", 0, "23456");
  TREE1.appendItemNC("DATA_","NEWMAN","Newman");
  TREE1.setToolTip("NEWMAN", 0, "34567");
  //Setting texts in the column "First name"
  TREE1.setText("SMITH",1,"Maria");
  TREE1.setText("DOE",1,"Anna");
  TREE1.setText("NEWMAN",1,"Jack");
  //Setting texts in the column "Address"
  TREE1.setText("SMITH",2,"Main Street 1");
  TREE1.setText("DOE",2,"Vienna Street 10");
  TREE1.setText("NEWMAN",2,"Einstein Street 100");
  //Setting texts in the column "Personnel number"
  TREE1.setText("SMITH",3, TREE1.getToolTip("SMITH", 0));
  TREE1.setText("DOE",3, TREE1.getToolTip("DOE", 0));
  TREE1.setText("NEWMAN",3, TREE1.getToolTip("NEWMAN", 0));
}

Assignment

Tree widget