I could swear I saw this somewhere
[1/4] from: Steven::White::ci::bloomington::mn::us at: 24-Nov-2003 14:24
Can a script change the text of one of its buttons? I thought I saw
that somewhere and I just can't find it again. It seems that the
following does NOT work. Thank you.
*_*_*_ sample
REBOL [ ]
view layout [
BTN-01: button "Press me" [BTN-01/text: "I am pressed" show
BTN-01]
]
*_*_*_ end of sample
Steven White
City of Bloomington
1800 W Old Shakopee Rd
Bloomington MN 55431-3096
USA
952-563-4882 (voice)
952-563-4672 (fax)
[steven--white--ci--bloomington--mn--us]
[2/4] from: maximo:meteorstudios at: 24-Nov-2003 16:27
REBOL [ ]
view layout [
BTN-01: button "Press me" [change BTN-01/texts/1 "I am pressed" show BTN-01]
]
-MAx
---
You can either be part of the problem or part of the solution, but in the end, being
part of the problem is much more fun.
[3/4] from: SunandaDH:aol at: 24-Nov-2003 16:56
Steven:
> Can a script change the text of one of its buttons? I thought I saw
> that somewhere and I just can't find it again. It seems that the
> following does NOT work. Thank you.
Your code works in later versions of REBOL.
In earlier ones, I guess a button is a subtype of a choice field, and that
can have multiple texts. Try this in your version:
REBOL [ ]
unview/all
view layout [
BTN-01: button "Press me" [BTN-01/texts/1: "I am pressed" show
BTN-01]
]
Sunanda.
[4/4] from: antonr:iinet:au at: 25-Nov-2003 23:40
That is incorrect, button and btn styles are
descended directly from face (in rebol/view 1.2.1
or 1.2.10 beta).
Anton.