[REBOL] /view radio button values Re:
From: gkoplas:localnet at: 2-Aug-2000 8:15
----- Original Message -----
> How can I retrieve the value of a radio button?
> Using the following...
> view layout [
> text "copy"
> copy-ack: radio of 'effects
> filter-ack: radio of 'effects
> button "do it" [print copy-ack]
The property you're looking for is "/state", and the value will be usable as
(I'm not sure if it actually uses the values "true" and "false", or "yes"
and "no", or whatever, so I've hard-coded "true" in my update to your layout
rather than using to-string).
Note that you can also set this value in a block when declaring the radio
button to set the default option, as shown.
view layout [
copy-ack: radio of 'effects [state: true]
filter-ack: radio of 'effects [state: false]
button "do it" [if copy-ack/state
... or whatever it is you'd really like to do with it.
Hope that's what you were looking for.
-- Geoff Koplas