-4

Trying to add values from a database field to an ocx combo box. In which if you type in the value , it gives you the matching values.

  • 2
    Stackoverflow works best if you provide us an example of what the problem is, with code, showing what you have tried, and what errors you are getting. It's not a code writing service. Also, we can't guess certain things, like the ocx in question, the Progress version, etc. – jdpjamesp Dec 05 '19 at 11:44

1 Answers1

0

You can use the old "COM Object Viewer" to look at the ocx. Its found in the "ProTools".

CSCombo32.ocx is normally found under /bin/system. Only on 32-bit installs though.

enter image description here

There you can see that AddItem takes a string and a index. The index being optional.

 DEFINE VARIABLE i AS INTEGER     NO-UNDO.
 i =  chCtrlFrame:CSCombobox:AddItem("Hello").

 MESSAGE "Hello added at position " i VIEW-AS ALERT-BOX.

Getting the value is done by calling Value():

MESSAGE chCtrlFrame:CSCombobox:Value().
Jensd
  • 7,886
  • 2
  • 28
  • 37