Skip to content

ComAddItem - cCJCommandBarComboBox

Used to add Text data to combo items - Exposes the AddItem Codejock COM method in the DataFlex proxy class

Type: Procedure

Parameters

Parameter Type Description
llText String The text to be displayed for this combo item
llIndex Variant The index of the item. This index is 1 based

Syntax

Procedure ComAddItem String llText Variant llIndex

Call Example

Send ComAddItem llText llIndex

Description

ComAddItem is used to add text combo item. See cCJCommandBarComboBox for a full description of how this method, along with ComItemData are used. Note that the index parameter is 1 based.

Procedure FillComboList Handle hoCombo
    // clear the combo
    Send ComClear     of hoCombo

    // add each combo item and an execution message
    // associated with that item
    Send ComAddItem   of hoCombo "Order" 1
    Set  ComItemData  of hoCombo 1 to msg_Activate_oOrderEntryView

    Send ComAddItem   of hoCombo "Customer" 2
    Set  ComItemData  of hoCombo 2 to msg_Activate_oCustomerView

    Send ComAddItem   of hoCombo "Vendor" 3
    Set  ComItemData  of hoCombo 3 to msg_Activate_oVendorView

    Send ComAddItem   of hoCombo "Inventory" 4
    Set  ComItemData  of hoCombo 4 to msg_Activate_oInventoryView

    Send ComAddItem   of hoCombo "Sales Person" 5
    Set  ComItemData  of hoCombo 5 to msg_Activate_oSalesPersonView

    // select the default item
    Set  ComListIndex  of hoCombo to 1
End_Procedure

This exposes the AddItem Codejock COM method in the DataFlex proxy class.

This class provides a standard COM import wrapper for Codejock CommandBarComboBox class. All methods, properties and events are the standard COM interfaces for this class. In DataFlex each Codejock object or collection name is prefixed with "cCJ", each COM Property or method name is prefixed with "Com", and each event name is prefixed with "OnCom".

For an overview on the DataFlex implementation of the commandbar system, refer to Using Menus, Toolbars and Statusbars.

For more information about the Codejock COM commandbar system interface, refer to Codejock's Xtreme CommandBar documentation (class: CommandBarComboBox, method: AddItem)