SelectedIndex

Parent Previous Next

SelectedIndex

This property returns the index of the selected item in the combo-box object.


Function Definition:


int SelectedIndex  {get; set;}


.     get: Permits the user to read the integer value.

.     set: Permits the user to write the integer value.



To configure this function, follow the steps below:


1.   In an object event, configure the SelectedIndex function: ComboBoxObjectName.SelectedIndex;


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 GraphicObject1). In a Text-Box object (named as GraphicObject2) the user configures the MouseUp event with the following event:


GraphicObject2.Text = GraphicObject1.SelectedIndex;


In this event, the GraphicObject2 will exhibit the integer value indicating the index of the selected item.



Example Set:


In the graphic document, the user has one Combo-Box object (named as GraphicObject1). In a Button object (named as GraphicObject2) the user configures the MouseUp event with the following event:


GraphicObject1.SelectedIndex = 1;


In this event, the GraphicObject1 will select the second item of the object. The first item of the object corresponds to the index 0 (zero).



 

Note: This property exists only to the following objects:

.     Combo-Box