Skip to content

Combo_Add_Item - ComboEntry

Adds an item to the combo list

Type: Procedure

Parameters

Parameter Type Description
sValue String The value to be added to the combo list

Syntax

Procedure Combo_Add_Item String sValue

Call Example

Send Combo_Add_Item sValue

Description

When this message is received, a choice is added to this object's list of choices with the value of sValue. This is most often used within the combo_fill_list procedure.

This sample fills a list and sets the default value to a fixed value

Procedure Combo_fill_list
    Send  Combo_Delete_Data // just in case the list is not empty
    Send Combo_Add_item "first"
    Send Combo_Add_item "second"
    Send Combo_Add_item "third"
    // set default to a value 
    Set Value to "second"
End_procedure

This sample fills a list and sets the default value to whatever is the first value

Procedure Combo_fill_list
    string sValue
    Send  Combo_Delete_Data
    Send Combo_Add_item "first"
    Send Combo_Add_item "second"
    Send Combo_Add_item "third"
    // set default to whatever the first value happens to be
    Get Combo_value 0 to sValue
    Set Value to sValue
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_fill_list | Combo_Item_Count | Combo_value | Combo_Insert_Item | Combo_Delete_Item | Combo_Item_Matching | Validate_Combo_Value | Add_Form_to_List