Listing of Names of Faces
[1/5] from: info:id-net:ch at: 29-Sep-2002 22:55
When you create a complex layout with inner faces, how is it possible to get
the structure of it.. with names of faces ?
Philippe Oehler
[2/5] from: greggirwin:mindspring at: 29-Sep-2002 15:49
Hi Philippe,
<< When you create a complex layout with inner faces, how is it possible to
get
the structure of it.. with names of faces ? >>
I'm not sure I understand exactly what you're after. You can iterate over
the faces in a pane, but any words that reference those faces are not
actually part of the layout structure, so you won't see them there.
--Gregg
[3/5] from: brett::codeconscious::com at: 30-Sep-2002 8:06
Hi,
> << When you create a complex layout with inner faces, how is it possible
to
> get
> the structure of it.. with names of faces ? >>
>
> I'm not sure I understand exactly what you're after. You can iterate over
> the faces in a pane, but any words that reference those faces are not
> actually part of the layout structure, so you won't see them there.
Actually they are - well at least for the variables variable set during
LAYOUT.
See the VAR facet for a given face. It will record the variable name
(set-word! used during layout) if one exists for a face. There is a known
problem for PANEL style though.
view layout [ myface: button [print face/var] ]
How useful this is, I'm not sure.
In terms of getting the structure of it, it is necessary as Gregg says, to
iterate through it.
Brett.
[4/5] from: anton:lexicon at: 30-Sep-2002 8:46
Not completely true.
When you create a layout such as:
lay: layout [
my-button: button
my-field: field
]
layout puts the set words into face/var
So you can iterate through the pane faces
and find them out. eg.
foreach face lay/pane [
print [face/var face/style face/offset face/size]
]
If you want to see the words inside a face, use:
print mold first face
Anton.
[5/5] from: greggirwin:mindspring at: 29-Sep-2002 17:52
<< Actually they are - well at least for the variables variable set during
LAYOUT.
See the VAR facet for a given face. >>
Thanks Brett *and* Anton! It never ceases to amaze me what I don't know. :)
--Gregg