Friday, 18 July 2008

Combo-Box With Data From List-Group

The data of a combo box can either be populated directly (from OBL) or dynamically using a list group. The list group must return the id and associated name; the id will not be visible but be passed to the item linked to the combo box (in the following example SRCO_ID_PM_TYPE), the name will be shown in the combo box.

BEGIN Combobox cboSRCO_ID_PM_TYPE
Iditem = "SRCO_ID_PM_TYPE"
Left = 174
Top = 4
Width = 300
Height = 20
Listgroup = "../lstgrpSRCO_ID_PM_TYPE"
Collabel = "##TM[SRCO_ID_PM_TYPE]"
END
BEGIN Listgroup lstgrpSRCO_ID_PM_TYPE
Iditem = "SRCO_ID_PM_TYPE"
Watchobject = "*O*../cboSRCO_ID_PM_TYPE.Visible"
BEGIN Function List
Idfuncchannel = "SRCO_PA_MT_PM_TYPE"
Idfuncnode = "SRCO_PA_MT_PM_TYPE"
Idfuncmethod = "LIST"
Mainargs = "ARG_SCO_ID_PM_TYPE"
Mainobjs = "SRCO_ID_PM_TYPE"
Targetitems = "SCO_ID_PM_TYPE,SCO_N_PM_TYPE"
Targetobjs = "SRCO_ID_PM_TYPE,SRCO_N_PM_TYPE"
END
END

No comments: