"setIcon"
    
    Sets an icon for a line in the tree widget.
Synopsis
shape.setIcon(string id, int column, string fileName);
Parameters
| Parameter | Description | 
|---|---|
| shape | Name of the object | 
| Id | The ID of the item | 
| column | The number of the column | 
| fileName | Name of the file (image) that should be shown. Specify the name of the image relative to the pictures directory e.g. "wizard.png" or "Indicators/image1.gif" or the absolute path. The image will be searched for in all proj_path/wincc_oa_path levels. See chapter Graphical design of panels for information on the supported graphic formats. | 
Description
Sets a widget's icon.
Example
Following example adds dummy entries to an empty tree widget and adds for comparison icons using the setIcon as well as the setIconAdjusted function.
main()
{
  //Add a column and dummy entries to the tree
  TREE1.addColumn("Entries");
  TREE1.appendItem("","ADJ","Adjusted Icon");
  TREE1.appendItem("","REG","Regular Icon");
  TREE1.appendItem("","NO","No Icon");
  //Set the icons
  TREE1.setIconAdjusted("ADJ",0,"login.png");
  TREE1.setIcon("REG",0,"login.png");
}
            
            Assignment
Tree widget
