[REBOL] Re: How to's
From: arolls:idatam:au at: 26-Oct-2001 11:43
Yes. Type this into your console a line at a time
(watch line-wrap):
lay: layout [size 300x300]
view/new lay
append lay/pane make get-style 'button [size: 40x40 color: red]
show lay
append lay/pane make get-style 'button [offset: 200x100 size: 40x40 color:
green]
show lay
wait none
; and a bit of analysis...
probe length? lay/pane ; == 2
type? lay/pane/1 ; == object!
probe first lay/pane/1
lay/pane/1/type ; == face
lay/pane/1/style ; == FACE
Layout returns a face object.
Every face object has a pane attribute.
So that means every face can have sub-faces,
simply if they are added to the pane
(with APPEND, for instance).
You can imagine a face within a face within
a face, accessed like this:
lay/pane/3/pane/1
That's the first face in the third face in
the window.
Also, you can see get-style returns a face
from the vid style that you specify.
Quite handy for this type of thing.
Anton.