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

[REBOL] Re: button vs box changes

From: sunandadh:aol at: 22-Dec-2001 15:34

Hi Richard,
> Why does [test-box] below show text and color changes made to a "box" .... > but [test-button] does NOT show changes made to a "button"?
Buttons are two-tone, so the effect gradient overrides the color setting. This will change the colour of a standard button: test-button: func [] [lay: layout [b: button "OK" button "Red Button" [b/effect/3: Red b/effect/4: pink show b] button "Text Button" [b/text: "not ok" show b] button "Print Button" [print join b/text [" " mold b/effect]]] view center-face lay] You could have set the color in the expected manner if you'd given the button a straight color in the first place: test-button: func [] [lay: layout [b: button "OK" Blue button "Red Button" [b/color: Red show b] button "Text Button" [b/text: "not ok" show b] button "Print Button" [print join b/text [" " mold b/effect]]] view center-face lay] To change the text on a button, use the TEXTS field. Inconsistent, I reckon, but fits with things line rotary and choice fields which use this for more the one displayable text in a button. test-button: func [] [lay: layout [b: button "OK" button "Red Button" [b/effect/3: Red b/effect/4: pink show b] button "Text Button" [b/textS: "not ok" show b] button "Print Button" [print join b/textS [" " mold b/effect]]] view center-face lay] Sunanda.