TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: alanjt on September 17, 2008, 03:04:44 PM

Title: DCL list displaying question
Post by: alanjt on September 17, 2008, 03:04:44 PM
if you have a dialog that displays a list of names, and 2 radio buttons for options, is it possible to have the list update itself in the dialog if you switch back and forth between the 2 radio buttons? i want to be able to have 2 lists loaded and depending on what radio button is picked, it will display that list. is this possible?
i'm just starting out with DCL, i was able to get a list box dialog working and i was able to get a 2 radio button dialog working (haven't had the chance to figure out how to combine them).
is this something i would have to look into ODCL for?
Title: Re: DCL list displaying question
Post by: Matt__W on September 17, 2008, 03:10:25 PM
It can certainly be done with regular ol' plain-Jane DCL, but I would rather do it with ODCL.

*sits back and waits for James*
Title: Re: DCL list displaying question
Post by: T.Willey on September 17, 2008, 03:12:02 PM
Yes.  You would do it with two lists.  Then in each action_tile call of the radio buttons, you would clear the listbox, and fill it with the right list for that button being picked.
Title: Re: DCL list displaying question
Post by: GDF on September 17, 2008, 04:37:07 PM
Check out this site for getting started with dcl dialog...

http://web2.airmail.net/terrycad/Tutorials/MyDialogs.htm
Title: Re: DCL list displaying question
Post by: alanjt on September 17, 2008, 05:33:44 PM
Quote
It can certainly be done with regular ol' plain-Jane DCL, but I would rather do it with ODCL.
i wouldn't mind doing it in odcl, i like the collapsible dialogs.

Quote
You would do it with two lists.  Then in each action_tile call of the radio buttons, you would clear the listbox, and fill it with the right list for that button being picked.
ok, so what radio button is pushed is evaluated immediately, not after you click ok (or whatever the execute button is)?

Quote
Check out this site for getting started with dcl dialog..
i've been going though that site and jeffreysanders.com tutorials.

thanks guys
Title: Re: DCL list displaying question
Post by: T.Willey on September 17, 2008, 05:46:49 PM
Quote
You would do it with two lists.  Then in each action_tile call of the radio buttons, you would clear the listbox, and fill it with the right list for that button being picked.
ok, so what radio button is pushed is evaluated immediately, not after you click ok (or whatever the execute button is)?
Yes.  The action_tile call happens when that control gets pushed.
Title: Re: DCL list displaying question
Post by: CAB on September 17, 2008, 08:05:53 PM
Here are some code fragments.
Code: [Select]
(defun Do_Set_list (Lst)
      (start_list "List_Box_Key")
      (mapcar 'add_list lst)
      (end_list)
)

(setq List1 '("first item" "second item" "third item" "forth item" "fith item"))
(setq List2 '("first item2" "second item2" "third item2" "forth item2" "fith item2"))
(action_tile "RB1" "(Do_Set_List List1)")
(action_tile "RB2" "(Do_Set_List List2)")
Title: Re: DCL list displaying question
Post by: jbuzbee on September 19, 2008, 08:54:31 AM
Quote
*sits back and waits for James*

Ha!

I was playing hooky yesturday.  Hey, if you want to do something in OpenDCL, let me know - I'll help.
Title: Re: DCL list displaying question
Post by: Matt__W on September 19, 2008, 08:58:46 AM
Quote
*sits back and waits for James*

Ha!

I was playing hooky yesturday.  Hey, if you want to do something in OpenDCL, let me know - I'll help.
Told you he'd be by!   :wink:
Title: Re: DCL list displaying question
Post by: jbuzbee on September 19, 2008, 09:01:20 AM
Am I that transparent?


 :-D
Title: Re: DCL list displaying question
Post by: alanjt on September 19, 2008, 10:46:11 PM
Quote
*sits back and waits for James*

Ha!

I was playing hooky yesturday.  Hey, if you want to do something in OpenDCL, let me know - I'll help.
Quote
Am I that transparent?


 grin
lol, actually, i was hoping you were going to respond. i'm sure i'll have several questions. i downloaded odcl last night and played around with the tutorials, etc. i was a little reluctant at first (was just going to figure it all out in dcl), but i couldn't get past all of the options it offers. i'm curious though, what files are required for a user to run a routine with odcl? are the 2 arx files "opendcl.16.arx" "opendcl.17.arx" the only files needed, or do you really have to run the install of odcl on every machine you want to run the routine with odcl?
Title: Re: DCL list displaying question
Post by: Kerry on September 20, 2008, 01:21:44 AM
....  i'm curious though, what files are required for a user to run a routine with odcl? are the 2 arx files "opendcl.16.arx" "opendcl.17.arx" the only files needed, or do you really have to run the install of odcl on every machine you want to run the routine with odcl?

.16  for 2004 - 2006
.17 for 2007 - 2009


re the runtime .. have a look at item 9) here ....
http://www.manusoft.com/outside/archive/2008_08_01_index.htm