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

Button Lable

 [1/5] from: rene:villa-cossio at: 17-Sep-2001 21:43


Hi there, I thought it would work :( REBOL[] view layou[ b1: button "click me.." [b1/text: "thanks for clicking" show b1] ] but after clicking "b1" lable will not change. hmmm... René Rene Schrader-Boelsche [rene--villa-cossio--com] Dellbruecker Steinweg 10 www.villa-cossio.com D-51069 Cologne +49 (0)221 6809990

 [2/5] from: allenk:powerup:au at: 18-Sep-2001 6:43


Hi Rene, A button, has potentially two text states*. An up and a down state. b1/text gets its value from b1/texts [] choosing either the first or second depending on the state of the button. You will find a similar relationship between b1/color and b1/colors (*rotary buttons have more) view layout [ b1: button "click me.." 150 [b1/texts: copy ["thanks for clicking"] show b1] ] or to give it a down state as well view layout [ b1: button "click me.." 150 [b1/texts: copy ["thanks for clicking" "I'm depressed"] show b1] ] Cheers, Allen K

 [3/5] from: gchiu::compkarori::co::nz at: 18-Sep-2001 13:58


Hi Allen What's wrong with this then? I want to set the button back to "action" once the user has selected. I don't want to leave the selection showing ... rebol [] view layout [ size 200x200 test: choice "action" "print" "view" [ if equal? value "print" [ print "print requested" ] if equal? value "view" [ print "view requested" ] test/texts: copy ["action" "print" "view"] show test ] ] -- Graham Chiu

 [4/5] from: philb:upnaway at: 18-Sep-2001 10:16


Hi Graham The value is actually a block ... to update the label set the text attribute below is the code that does what you want .... rebol [] view layout [ size 200x200 test: choice "action" "print" "view" [ if equal? first value "print" [ print "print requested" ] if equal? first value "view" [ print "view requested" ] test/text: copy first test/texts show test ] ] Cheers Phil -- Originalal Message -- Hi Allen What's wrong with this then? I want to set the button back to "action" once the user has selected. I don't want to leave the selection showing ... rebol [] view layout [ size 200x200 test: choice "action" "print" "view" [ if equal? value "print" [ print "print requested" ] if equal? value "view" [ print "view requested" ] test/texts: copy ["action" "print" "view"] show test ] ] -- Graham Chiu

 [5/5] from: gchiu:compkarori at: 18-Sep-2001 15:58


> below is the code that does what you want .... >
Choice Phil :) Now to figure out why when I use a choice button in my reblet, CPU use jumps to 100% :( -- Graham Chiu