"userData"

Saves/Returns a user-specific text for an item.

Synopsis

setValue(string shape, "userData", int pos, string data);

getValue(string shape, "userData", int pos, string &data);

shape.userData(int pos, string data);

Parameters

Parameter Description
shape Name of the object.
pos Index of the selected item, starting with 1.
data User-specific text for the item.

Description

Saves/Returns a user-specific text for an item.

Example

main()
{
  string data, data1;
  //The text "myData" is set for the item at position 1
  setValue("COMBO_BOX1", "userData", 1, "myData");
  /*Gets the user-specific text for the item at position 1 and writes it to the data variable*/
  getValue("COMBO_BOX1", "userData", 1, data);
  /*Gets the user-specific text for the item at position 2 and writes it to the data1 variable*/
  getValue("COMBO_BOX1", "userData", 2, data1);
  //Returns "myData":
  DebugN(data);
  //Returns "" because no data was defined:
  DebugN(data1);
}

Assignment

Combo box