TheSwamp

Code Red => Visual DCL Programming => AutoLISP (Vanilla / Visual) => OpenDCL => Topic started by: Lastknownuser on December 22, 2021, 06:28:12 AM

Title: ComboBox drop down select
Post by: Lastknownuser 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.
Title: Re: ComboBox drop down select
Post by: lesperguer 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.

Title: Re: ComboBox drop down select
Post by: cadpoobah 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.
Title: Re: ComboBox drop down select
Post by: roy_043 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\
Title: Re: ComboBox drop down select
Post by: cadpoobah 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.
Title: Re: ComboBox drop down select
Post by: roy_043 on March 21, 2022, 03:46:43 AM
I did not mention a specific file.
Title: Re: ComboBox drop down select
Post by: jonathann3891 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))