From: Dick
> In a GUI ...
>
> How can you have a common panel variable which can be set to another maybe
complex panel?
>
> Such that the view appears to morph, with one panel area (that may be
larger or smaller).
>
> For example, how about this layout:

<interesting but not altogether understood specification snipped>

> Idea is that the BP and IP are the body so to speak. On a
> button press, the BP changes to another set of buttons, and
> the IP is tailored for that new mode/view. The IP might be
> where you show the fields of the current record.
<more snipping>

Hi, Dick,

I believe that I caught the gist of what you are seeking.  I only had 5
minutes, so I hacked a pre-existing demo script to achieve the kind of
effect that you seem to be describing.  Of course, this example addresses
none of your specification; it only is meant to demonstrate the simplicity
of REBOL's gui and the Gregg's idea of throw away pages/reblets.

--Scott Jones  (script follows)

REBOL [Title: "Subpanels"]

main: layout [
    vh2 "Subpanel Examples"
    guide
    pad 20
    bpanels: box 160x140
    return
    box 2x140 maroon
    return
    panels: box 220x140
]

bpanel1: layout [
    button "Panel 1" [
        bpanels/pane: bpanel1
        panels/pane: panel1
        show [bpanels panels]
    ]
    button "Panel 2" [
        bpanels/pane: bpanel2
        panels/pane: panel2
        show [bpanels panels]
    ]
    button "Quit" [quit]
]

bpanel2: layout [
    button "Alt Panel 1" [
        bpanels/pane: bpanel1
        panels/pane: panel1
        show [bpanels panels]
    ]
    button "Alt Panel 2" [
        bpanels/pane: bpanel2
        panels/pane: panel2
        show [bpanels panels]
    ]
    button "Quit" [quit]
]

panel1: layout [
    origin 8x8
    h2 "Panel 1"
    field "Field 1"
    field "Field 2"
    button "The Answer" [alert "I know nothing."]
]

panel2: layout [
    origin 8x8
    h2 "Panel 2"
    across
    txt "X:"
    slider 150x16
    return
    txt "Y:"
    slider 150x16
    return
    check [panel2/color: maroon  show panel2]
    txt "Don't click this"
    return
    check [panel2/color: silver  show panel2]
    txt "Click this"
    return
]

bpanel1/offset: 0x0
bpanel2/offset: 0x0

panel1/offset: 0x0
panel2/offset: 0x0

bpanels/pane: bpanel1
panels/pane: panel1

view main



-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to