"replacePos"

Replaces the text for a specific option.

Synopsis

setValue(string shape, "replacePos", int idx, langString new);

shape.replacePos(int idx, langString new);

Parameters

Parameter Description
shape Name of the object
idx Index of the item to be replaced, starting with 1
new New item in all languages

Description

Replaces the option with the index "idx" (starts at 1) with the text "new".

Example

The following example replaces the third item in the combo box "COMBO_BOX1" with the text "150".

main()
{
  shape cb=getShape("COMBO_BOX1");
  cb.replacePos(3, "150");
}

Assignment

Combo box