Hi Mike,

It is a little confusing. But the style refinement in this case refers to
the button (or other style) to inherit the style from. This "button" has to
exist as a face object in the layout for it to work., 'choose also uses this
style to set the offset.

I couldn't figure out how to set a style in the way you were trying, even by
using 'get-style and 'make-face it didn't seem possible.

Anyway here is an example that provides the wider button style, which you
were after

;Example 1

l1: layout [
    style long-btn button 200x20
    size 300x200
    at 20x80 mnu: long-btn "Long Button Text" [
        choose/style [
           "Long Choice Text1"
           "Long Choice Text2"
           "Long Choice Text3"
        ]
        func [f a][print f/text]
        mnu
    ]
]
view l1


Cheers,

Allen K

;Example 2, sets offset and parent-window

l1: layout [
    style long-btn button 200x20
    size 300x200
    at 20x80 mnu: long-btn "Long Button Text" [
        choose/style/window/offset [
            "Long Choice Text1"
            "Long Choice Text2"
            "Long Choice Text3"
            "Long Choice Text3"]
            func [f a][print f/text] mnu l1 mnu/offset
    ]
]
view l1


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 17, 2000 6:12 AM
Subject: [REBOL] Ally list having problems ???


> Looks like Ally list is having problems...
>
> ======================================================
>
> >>REBOL Alliance Members Only
>
> >>Sorry. You attempted to send email to the REBOL
> >>Alliance members conference list, but your name
> >>was not found in the Alliance directory.
>
> >>If you know that you are part of the Alliance,
> >>please check that your email address is identical
> >>to that which you provided to us earlier. If your
> >>email address has recently changed, please contact
> >>[EMAIL PROTECTED]
>
> >>-SELMA
>
> =========================================================
> (REPOSTING QUESTION TO REBOL list)
>
> Hello,
>
> The following code works as expected:
>
> >> l1: layout [style long-btn button 200x20
> [ long-btn "Long Button Text" [choose ["Long Choice Text1" "Long
> Choice Text2" "Long Choice Te
> xt3" ] none]
> [ ]
> >> view l1
>
> However the choice options didn't display correctly.
>
> I tried adding the style refinement to choose but i got the following
> error message?
>
> >> l1: layout [style long-btn button 200x20
> [ long-btn "Long Button Text" [choose/style ["Long Choice Text1"
> "Long Choice Text2" "Long Cho
> ice Text3" ] none long-btn]
> [ ]
> >> view l1
> ** Script Error: long-btn has no value.
> ** Where: choose/style ["Long Choice Text1" "Long Choice Text2" "Long
> Choice Text3"] none long-bt
> n
> >> What is choose expecting? Help says it's an object?
>
> Thanks in advance.
>
> Mike.
>
>
>
>
>
>

Reply via email to