[REBOL] Re: View/Draw'ing with 'size...
From: allenk:powerup:au at: 23-Oct-2001 6:41
----- Original Message -----
From: "Media" <[media--quazart--com]>
To: "reblist" <[rebol-list--rebol--com]>
Sent: Tuesday, October 23, 2001 3:47 AM
Subject: [REBOL] View/Draw'ing with 'size...
> Hi I am starting to delve deeply into the depts of View and have come to
realize that its actually easier to build dynamic Views using panes and
faces directly instead of using VID.
> but When creating the button panels, it still is easier to make use of
VID. There is one difference I have found, and this will be a teaser for
the 'binding experts I think
> If you run the following snippet:
>
> rebol []
>
> q-style: stylize [
> qbutton: box 100x100
> effect [ tile
> contrast 10
> gradmul 0x1 120.120.120 80.80.80
> draw [pen 0.0.255 box 0x0 size]
> ]
> ]
>
> view layout [styles q-style qbutton "HEY!"]
>
> You will notice that at the time of running, There seems to be a problem
where size does not exist within the draw block... in a sense its normal...
> Thus I cannot modify my button's edge looks this way... I guess it is not
bound to the face it (eventually) creates...
Using with in the stylize dialect allows you to build a style more face like
way. It gives you the best of both worlds. (FACE + VID)
e.g
q-style: stylize [
qbutton: box 100x100
with [
effect: [ tile
contrast 10
gradmul 0x1 120.120.120 80.80.80
draw [pen 0.0.255 box 0x0 size]
]
]
]
Cheers,
Allen K