Items
This function will configure the items in the combo-box object.
With this function, the user will be able to insert one or more items in the combo-box object with a single command or load the items values in a string list.
Function Definition:
List<string> Items {get; set;}
. get: Permits the user to read the items values.
. set: Permits the user to insert the items values.
To configure this function, follow the steps below:
1. In an object event, configure the Items function: ObjectName.Items;
2. During the execution of RunTime, run the configured event.
Example Get:
In the graphic document, the user has one Combo-Box object (named as ComboBox1) with 3 items configured: "Item1", "Item2", "Item3". In a Button object (named as GraphicObject2) the user configures the MouseUp event with the following event:
List<string> lista = new List<string>();
foreach (string i in ComboBox1.Items)
{
lista.Add(i);
}
@TagString[0] = lista[0];
@TagString[1] = lista[1];
@TagString[2] = lista[2];
In this event, the vector "TagString" will be populated with the values of the items: "Item1", "Item2" and "Item3".
Example Set:
In the graphic document, the user has one Combo-Box object (named as ComboBox1). In a Button object (named as GraphicObject2) the user configures the MouseUp event with the following event:
List<string> lista = new List<string>();
lista.Add("Item1");
lista.Add("Item2");
lista.Add("Item3");
ComboBox1.Items = lista;
In this event, the combo-box object will be populated with the items: "Item1", "Item2" and "Item3".
|
Note: This property exists only to the following objects: |