From: "Bertrand"
> First of all I want to congratulate this list
> as it works very well. I had a look to
> Graham Chiu about radio button, and his
> answer and Scott are very close to what
> I am looking for.
>
> Scott I am happy with your answer, as I
> learnt more about View, but I don't want
> to see items replacing the previous one, I
> would like it to be added as a suplementary
> face into a layout.
>
> To be more precise, say I want to implement
> an outliner, (you know like the one in
> microsoft word), if I want to insert a sub-item,
> it has to be displayed below its parent and
> shiftted to right. That' s the point.
Hi, Bertrand,
Unfortunately (or perhaps fortunately ;-), I am not familiar with Microsoft
Word, but I certainly understand the concept.
This is *not* pretty, but I believe that it demonstrates the concept of
adding to a layout after it has been laid out. Hopefully the concept show
through that one can add additional "subfaces" to the pane of a face. This
example shows a quick and dirty approach, but I am sure that you would want
to add better text management, do some refactoring and make it more generic.
svv: system/view/vid
data: [
"Scott" "123 Main"
"Carl" "456 Maple"
"Bertrand" "789 Oak"
]
lo-func: func [txt-str] [
new-pane: make select svv/vid-styles 'text [
text: txt-str
color: 142.128.110
size: 200x200
]
if not empty? b/pane [
pane-count: length? b/pane
new-pane/offset: b/pane/:pane-count/offset + 0x34
]
new-pane
]
lo: layout [
origin 10x10
b: box 200x200
button "Add Info" [
my-text: rejoin [data/1 "^/^-" data/2]
next-pane: lo-func my-text
append b/pane next-pane
show b
data: skip data 2
if tail? data [data: head data]
]
do [b/pane: copy []]
]
view lo
;##############
Please let me know how it works and if this is closer to that which you seek
and if you need further comments to explain the functionality.
--Scott Jones
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.