Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] /view radio button values Re:

From: gkoplas:localnet at: 2-Aug-2000 8:15

----- Original Message ----- From: <[RChristiansen--pop--isdfa--sei-it--com]>
> 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 a boolean (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. e.g.
>>>>>>>>
view layout [ text "copy" copy-ack: radio of 'effects [state: true] filter-ack: radio of 'effects [state: false] button "do it" [if copy-ack/state [print "true"] ] ] <<<<<<<<< ... or whatever it is you'd really like to do with it. Hope that's what you were looking for. -- Geoff Koplas