Combo_Value - ComboForm
Specifies the value of an item in the combo objects data-list
Type: Property
Access: Read/Write
Data Type: String
Parameters: None
Parameters
| Parameter | Type | Description |
|---|---|---|
| iItem | Integer |
Syntax
Property String Combo_Value
| Access Type | Syntax |
|---|---|
| Read Access: | Get Combo_Value to StringVariable |
| Write Access: | Set Combo_Value to StringVariable/Value |
Description
The Combo_value property gets and sets the value of an item in a combo data-list.
This sample shows all items in a combo list.
Procedure ShowAllValues
String sCurrent sValue
Integer i iItems
Boolean bIsCurrent
Get Value to sCurrent // the current value of the combo form
Get Combo_Item_Count to iItems
For i from 0 to (iItems-1)
Get Combo_Value i to sValue // the value of each item in the form
Move (sCurrent=sValue) to bIsCurrent
Send ShowList i sValue bIsCurrent
Loop
End_Procedure
You can use combo_value to set the value of a combo-form to an item in your list. This sets your form value to the last item in your combo list
Get Item_Count to iItems
Get Combo_Value (iItems-1) to sValue
Set Value to sValue
| Col 1 | Col 2 |
|---|---|
| Note: | This represents the item position in the internal list and not the Windows list. If the Windows list is sorted, these positions will be different. |
See Also
Combo_Item_Count | Combo_add_item | Combo_Insert_Item | Combo_Delete_Item | Combo_Item_Matching | Validate_Combo_Value | Add_Form_to_List