Creating Sub-Sub-Panel
[1/5] from: moeller_thorsten::gmx::de at: 5-Jul-2001 12:13
H,
i need a little assistance from som view specialists. I have a main Window.
In this main-window there is a subpanel which content depends on menu
choices from the main window. In this subpanel there are buttons which
should control the content of another subpanel right from the first
subpanel.
I hope anybody will understand this construction or has a better appearance
to this problem
Perhaps anybody could help me out with a little sample code?
Should be like:
-----------------------------------
| menu |
-----------------------------------
| | |
| s1 | s2 |
| | |
| | |
| | |
-----------------------------------
Thorsten
[2/5] from: sanghabum:aol at: 5-Jul-2001 7:34
[moeller_thorsten--GMX--De]:
> i need a little assistance from som view specialists. I have a main Window.
> In this main-window there is a subpanel which content depends on menu
<<quoted lines omitted: 4>>
> to this problem
> Perhaps anybody could help me out with a little sample code?
Hi Thorsetn,
An example left over form my "teach-meself panels" afternoon... Hope it
illustrates the point.
--Colin.
==========
rebol [title: "panels within panels"]
mainlayout: layout [Banner "main screen"
below
button "panel A"
[mainlayout-panel/pane: sublayoutA
show mainlayout-panel
]
button "Panel B"
[mainlayout-panel/pane: subLayoutB
show mainlayout-panel
]
return
mainlayout-panel: box 400x400 blue
]
SubLayoutA: layout [across
banner "panel A"
button "panel a1"
[subLayoutA-Panel/pane: SubLayoutA1
show sublayoutA-Panel
]
button "panel a2"
[subLayoutA-Panel/pane: SubLayoutA2
show sublayoutA-Panel
]
Return
SubLayoutA-panel: box 300x300 red
]
SubLayoutB: layout [across
banner "panel B"
button "panel b1"
[subLayoutB-Panel/pane: SubLayoutB1
show sublayoutB-Panel
]
button "panel b2"
[subLayoutB-Panel/pane: SubLayoutB2
show sublayoutB-Panel
]
Return
SubLayoutB-panel: box 300x300 green
]
SubLayoutA1: layout [banner "panel A1"]
SubLayoutA2: layout [banner "panel A2"]
SubLayoutB1: layout [banner "panel B1"]
SubLayoutB2: layout [banner "panel B2"]
unview/all view mainlayout
[3/5] from: moeller_thorsten:gmx at: 5-Jul-2001 14:35
Hi Colin,
Your example proves my first thougths, but i always get the following error:
Script Error: Invalid path value: pane
Where: func [face value][sub-layout/pane: sub-layout-error show sub-layout]
Near: sub-layout/pane: sub-layout-error show sub-layout
Any Ideas for this?
Your sample is running well!
Thorsten
-----Ursprungliche Nachricht-----
Von: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]Im Auftrag
von [Sanghabum--aol--com]
Gesendet: Donnerstag, 5. Juli 2001 13:34
An: [rebol-list--rebol--com]
Betreff: [REBOL] Re: Creating Sub-Sub-Panel
[moeller_thorsten--GMX--De]:
> i need a little assistance from som view specialists. I have a main
Window.
> In this main-window there is a subpanel which content depends on menu
> choices from the main window. In this subpanel there are buttons which
> should control the content of another subpanel right from the first
> subpanel.
>
> I hope anybody will understand this construction or has a better
appearance
> to this problem
>
> Perhaps anybody could help me out with a little sample code?
>
Hi Thorsetn,
An example left over form my "teach-meself panels" afternoon... Hope it
illustrates the point.
--Colin.
==========
rebol [title: "panels within panels"]
mainlayout: layout [Banner "main screen"
below
button "panel A"
[mainlayout-panel/pane: sublayoutA
show mainlayout-panel
]
button "Panel B"
[mainlayout-panel/pane: subLayoutB
show mainlayout-panel
]
return
mainlayout-panel: box 400x400 blue
]
SubLayoutA: layout [across
banner "panel A"
button "panel a1"
[subLayoutA-Panel/pane: SubLayoutA1
show sublayoutA-Panel
]
button "panel a2"
[subLayoutA-Panel/pane: SubLayoutA2
show sublayoutA-Panel
]
Return
SubLayoutA-panel: box 300x300 red
]
SubLayoutB: layout [across
banner "panel B"
button "panel b1"
[subLayoutB-Panel/pane: SubLayoutB1
show sublayoutB-Panel
]
button "panel b2"
[subLayoutB-Panel/pane: SubLayoutB2
show sublayoutB-Panel
]
Return
SubLayoutB-panel: box 300x300 green
]
SubLayoutA1: layout [banner "panel A1"]
SubLayoutA2: layout [banner "panel A2"]
SubLayoutB1: layout [banner "panel B1"]
SubLayoutB2: layout [banner "panel B2"]
unview/all view mainlayout
[4/5] from: sanghabum:aol at: 5-Jul-2001 9:22
[moeller_thorsten--GMX--De]:
> Script Error: Invalid path value: pane
> Where: func [face value][sub-layout/pane: sub-layout-error show sub-layout]
> Near: sub-layout/pane: sub-layout-error show sub-layout
>
> Any Ideas for this?
Not really, not without seeing you code.... But a couple of thoughs....Is
Sub-layout a face within a layout, as in my examples....
layout [....
sub-layout: box 300x300
...]
A common mistake I make with named faces is to do something like this in my
main code:
mybox: "We have a problem"
or
mypanel: sub-panel4
or
myimage: load-image %prittypic.jpg
when what I mean is
mybox/TEXT: "We have a problem"
and
mypanel/PANE: sub-panel4
and
myimage/IMAGE: load-image %prittypic.jpg
This has the effect of destroying the object, and so making all paths within
in invalid.
Post your code if these two tips don't help,
--Colin.
[5/5] from: moeller_thorsten:gmx at: 5-Jul-2001 17:01
Hi Colin,
thanks for your suggestions. The error was, i defined the sub-layout like
this:
sub-layout: origin 176x0 box 300x300 coal
The reason of the problem was the origin part. Removing it and placing it
before the subpanel definition solves it.
But thanks again for your assistance
Thorsten
-----Ursprungliche Nachricht-----
Von: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]Im Auftrag
von [Sanghabum--aol--com]
Gesendet: Donnerstag, 5. Juli 2001 15:23
An: [rebol-list--rebol--com]
Betreff: [REBOL] Re: Creating Sub-Sub-Panel
[moeller_thorsten--GMX--De]:
> Script Error: Invalid path value: pane
> Where: func [face value][sub-layout/pane: sub-layout-error show
sub-layout]
> Near: sub-layout/pane: sub-layout-error show sub-layout
>
> Any Ideas for this?
Not really, not without seeing you code.... But a couple of thoughs....Is
Sub-layout a face within a layout, as in my examples....
layout [....
sub-layout: box 300x300
...]
A common mistake I make with named faces is to do something like this in my
main code:
mybox: "We have a problem"
or
mypanel: sub-panel4
or
myimage: load-image %prittypic.jpg
when what I mean is
mybox/TEXT: "We have a problem"
and
mypanel/PANE: sub-panel4
and
myimage/IMAGE: load-image %prittypic.jpg
This has the effect of destroying the object, and so making all paths within
in invalid.
Post your code if these two tips don't help,
--Colin.
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted