Combo_Insert_Item - ComboForm
Inserts a combo item in a combo object's list
Type: Procedure
Parameters
| Parameter | Type | Description |
|---|---|---|
| iItem | Integer | The item number |
| sValue | String | The value of the item to be inserted in the combo list |
Syntax
Procedure Combo_Insert_Item Integer iItem String sValue
Call Example
Send Combo_Insert_Item iItem sValue
Description
The Combo_insert_item procedure inserts a combo item to this object's list in the position of iItem with a value of sValue.
This example, checks to see if the value "second" exists in the combo list. If it does not it inserts it before the value "third".
Procedure AddSecond
Integer iPos
// see if "second" already exists
Get Combo_Item_Matching "second" to iPos
// if it does not exist add it
If (iPos=-1) Begin
Get Combo_Item_Matching "third" to iPos
If (iPos>-1) Begin // only insert if we can find "third"
Send Combo_insert_item iPos "second"
end
end
end_procedure
| 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_Add_Item | Combo_fill_list | Combo_Item_Count | Combo_value | Combo_Delete_Item | Combo_Item_Matching | Validate_Combo_Value | Add_Form_to_List