Author Topic: ComboBox drop down select  (Read 4654 times)

0 Members and 1 Guest are viewing this topic.

Lastknownuser

  • Newt
  • Posts: 25
ComboBox drop down select
« on: December 22, 2021, 06:28:12 AM »
Hi, I recently started doing OpenDCL programs, but its hard to find tutorials and I can't register on OpenDCL forum (I'm not getting mail to confirm my account). I'm having a problem, and solution should be easy but can't figure it out. I define a list of values (item1, item2,...) that can be selected by drop down combobox. How to setq a variable of the chosen value? For example, I choose "item1", and I want that some variable "VALUE" to be "item1" that is used later in my program.

lesperguer

  • Mosquito
  • Posts: 2
Re: ComboBox drop down select
« Reply #1 on: January 09, 2022, 02:30:14 PM »
Hi, did you check the tutorial attached? Its available in opendcl website.

I´m recently learning OpenDCL I don have experience with the dropdown control. But if you check the Help fo opendcl you will find the controls and theirs properties.

I wondering you can do it with (dcl-Control-SetText [dropdown  name] [NewValue as string]) , the value of 'NewValue'  always must be a string.

I hope you have resolve it.


cadpoobah

  • Newt
  • Posts: 48
Re: ComboBox drop down select
« Reply #2 on: March 04, 2022, 05:08:39 PM »
The tutorial referenced would be handy if it actually mentioned a ComboBox, which it doesn't!  :roll: Well, except for the words "combo box" in the Appendix.

As an OpenDCL newbie (only a couple weeks in), it's impressive, but finding good examples is very time-consuming. Would be amazing to have them included in the help.
Chris Lindner
Onebutton CAD Solutions
----------------------------------------------------
www.onebuttoncad.com #dayjob
www.unpavedart.com    #sidehustle

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: ComboBox drop down select
« Reply #3 on: March 05, 2022, 03:57:46 AM »
Try the OPENDCLDEMO command.
The code for all samples can be found here:
C:\Program Files (x86)\OpenDCL Studio\ENU\Samples\

cadpoobah

  • Newt
  • Posts: 48
Re: ComboBox drop down select
« Reply #4 on: March 20, 2022, 11:00:50 PM »
Try the OPENDCLDEMO command.
The code for all samples can be found here:
C:\Program Files (x86)\OpenDCL Studio\ENU\Samples\

Thanks, roy_043, but there is no such file in that folder.
Chris Lindner
Onebutton CAD Solutions
----------------------------------------------------
www.onebuttoncad.com #dayjob
www.unpavedart.com    #sidehustle

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: ComboBox drop down select
« Reply #5 on: March 21, 2022, 03:46:43 AM »
I did not mention a specific file.

jonathann3891

  • Mosquito
  • Posts: 9
Re: ComboBox drop down select
« Reply #6 on: April 28, 2022, 03:11:49 PM »
If you want the value as a string, this will work:
Code: [Select]
(setq val (dcl-ComboBox-GetEBText ModelRole/Form1/ComboBox1))