How to add items to combo list?

Started by neperin · 2023-03-24 20:33 UTC · 3 replies · SMF topic #2852

Hello everybody.
I am a newbie, so the question might be rather simple.
How to add items to the combo box in modelless mode? I've search through properties but I couldn't find anything.
Hi,

you can replace the complete list by calling AddList: http://www.opendcl.com/HelpFiles/index.php?page=Reference/Method/ComboBox/AddList.htm
you can add an item by calling AddString: http://www.opendcl.com/HelpFiles/index.php?page=Reference/Method/ComboBox/AddString.htm

The complete list of methods and properties you can see at http://www.opendcl.com/HelpFiles/index.php?page=Reference/Control/ComboBox.htm

I hope that helps.
With regards, Fred
Thanks for the reply.
However, I couldn't get the results I want. I really want to populate the combo box in the first place, when the program starts running.
But It is empty, unfortunately.

Here is my code snippet:

(defun c:qq ()
  (command "_OPENDCL")
  (dcl_project_load "modeless")
  (dcl_form_show modeless_mainForm)
  (dcl-Control-AddList bo_type (list "A" "B" "C"))
  (princ)
)
Hello, have you already tried to put it into the OnInitialize event?
With regards, Fred