Consultor Eletrônico



Kbase P15496: How To Add Data To The CsCombo OCX Control With Multiple Col
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   19/03/2003
Status: Unverified

GOAL:

How to Add Data to the CsCombo OCX Control with Multiple Columns

FACT(s) (Environment):

Windows 32 Intel

FACT(s) (Environment):

Windows NT 32 Intel/Windows 2000

FIX:

The following sample code assumes that the CSCombo OCX control in the AppBuilder is being used.

To load the Salesrep and Repname from the Sports2000 database into the control, use code similar to the following:

FOR EACH Salesrep NO-LOCK:
chCtrlFrame:CSComboBox:AddItem(Salesrep.Salesrep + ";" + Salesrep.Repname).
END.

This assumes that the ColDelim has been set to ';' and that you have defined ColWidths in the Contents tab (i.e. '5;15') of the CSCombo properties. This can also be done by code, for example:

chCtrlFrame:CSComboBox:ColDelim = ";".
chCtrlFrame:CSComboBox:ColWidth(0) = 5.
chCtrlFrame:CSComboBox:ColWidth(1) = 15.