PDA

View Full Version : functions for radio buttons


chuck
11-01-2004, 09:30 PM
I have a dcl with a radio button having a "key" darv.
When I select this button and "ok" I would like to run a lisp routine
(c:darv) what would my autolisp code look like for this?

bestafor
11-02-2004, 05:53 AM
HiHO;
(Action_Tile "darv" "(c:darv)")
Now this isn't all the code you will have to write,
but this is the piece that will run your lisp routine.




"chuck" <chuck@nospam.wo> wrote in message
news:9XEhd.1638$14.1352@read1.cgocable.net... I have a dcl with a radio button having a "key" darv. When I select this button and "ok" I would like to run a lisp routine (c:darv) what would my autolisp code look like for this?

Jürgen Palme
11-02-2004, 06:51 AM
"chuck" <chuck@nospam.wo> schrieb im Newsbeitrag
news:9XEhd.1638$14.1352@read1.cgocable.net... I have a dcl with a radio button having a "key" darv. When I select this button and "ok" I would like to run a lisp routine (c:darv) what would my autolisp code look like for this?


A first hint: It makes no sense to have only ONE radio button. You need a
radio_column or a radio_row with at least two radio_buttons.

A snip of a dcl fragment (example):

: radio_column {
key = "k1";
: radio_button {
key = "kk1";
}
: radio_button {
key = "kk2";
}
...
}

In your LISP code you need this lines (fragment):

(action_tile "k1" "(do_something $value)")
....
(defun do_something (wert)
(cond
((= wert "kk1") (do_this))
((= wert "kk2") (do_that))
...
)
)

do_this or do_that can be a call of your (c:darv)


HTH
Juergen

chuck
11-03-2004, 04:02 PM
I have about twelve radio buttons and an ok_cancel_help row. All the radio
buttons are calls to a function. The help button calls to a custom help
"chuck.hlp" dialog. I've got the radio buttons working pretty well by
assigning a text string to each and then calling to the correct function
when the corresponding radio button is selected. I'm having a little trouble
with the help button though. I would like to bring up the custom hlp file
when selected and have the dialog box remain when the help file is closed.


"Jürgen Palme" <juergenDEL.palmeALL@kabelleipzigCAPS.de> wrote in message
news:2upl7bF2cjgd0U1@uni-berlin.de... "chuck" <chuck@nospam.wo> schrieb im Newsbeitrag news:9XEhd.1638$14.1352@read1.cgocable.net... I have a dcl with a radio button having a "key" darv. When I select this button and "ok" I would like to run a lisp routine (c:darv) what would my autolisp code look like for this? A first hint: It makes no sense to have only ONE radio button. You need a radio_column or a radio_row with at least two radio_buttons. A snip of a dcl fragment (example): : radio_column { key = "k1"; : radio_button { key = "kk1"; } : radio_button { key = "kk2"; } ... } In your LISP code you need this lines (fragment): (action_tile "k1" "(do_something $value)") ... (defun do_something (wert) (cond ((= wert "kk1") (do_this)) ((= wert "kk2") (do_that)) ... ) ) do_this or do_that can be a call of your (c:darv) HTH Juergen


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service