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

[REBOL] Re: radio button

From: ingo:2b1 at: 21-Sep-2002 15:30

Hi Nicolas, there may be different ways to do it, I would put the radio buttons into a block, and reference them through there index in the block. Normally I would add the buttons directly after I created the word to hold them, so what I#ll show here is, how to get them out of a layout block. ;-- Rebol file starts -- [REBOL [ Title: "Dynamically named radiobuttons" ] radio-buttons: copy [] lay: [ t7: text "Just an example" r1: radio of 'groupe1 text "INFO DYN1" r2: radio of 'groupe1 text "INFO DYN2" rn: radio of 'groupe1 text "INFO DYNn" button "Set second button" [ ; the words are only defined _after_ layout, so I can't ; get the real buttons before the layout rb: get radio-buttons/2 rb/state: true ; and why are changes not shown? show lay ] ] parse lay [ here: (probe here) some [ to set-word! here: (probe here) [ copy wrd set-word! 'radio ( ; change set-word! to word! ; why is wrd a block? wrd: to word! wrd/1 ; apend the word to the list of ; radiobuttons append radio-buttons wrd ) | skip | to end ] ] ] view layout lay ] ; -- rebol file ends -- I hope this will guide you on your way ... Ingo Am Sam, 2002-09-21 um 11.50 schrieb Nicolas Maillard: