[REBOL] Re: Oval buttons
From: anton:lexicon at: 6-Sep-2002 4:45
I have found the new effect pipeline in the betas
so confusing I have given up before already, trying
the same thing.
Anyway, here is a round-about way of doing it,
which works in
REBOL/View 1.2.1.3.1 21-Jun-2001:
img: to-image layout [
origin 0 image blue effect [oval key 0.0.0]
]
view center-face layout [
button "hello" img edge [size: 0x0]
]
To make the button change colour or image when you
click on it, you are going to have to delve into
the button more.
But here's another way:
view center-face layout [
button 100x50 black "hello" [print "hi"]
edge [size: 0x0]
effect [
draw [pen white circle 50x25 20 fill-pen red flood 50x25]
key 0.0.0 ; (black)
]
]
To get the colour to change when you click, you can
set the 'effects facet:
effect-blks: [
[draw [pen white circle 50x25 20 fill-pen red flood 50x25] key 0.0.0]
[draw [pen white circle 50x25 20 fill-pen green flood 50x25] key 0.0.0]
]
view center-face layout [
b: button 100x50 black "hello" [print "hi"]
with [effects: effect-blks]
edge [size: 0x0]
]
Anton.