Hi Robert,

On Thursday, September 19, 2002, 9:18:08 AM, you wrote:

>> ;do a throw away 'layout inorder to get a
>> ;default text face using 'as-is
>> layout [
>>     t: text as-is mytext
>> ]

RMM> :-) That's smart! I'm going to try it, thanks! Robert

Actually,  you  don't  need  to  do  that, unless you want to take
benefit from what LAYOUT does without having to do it by yourself.
Since  you  are  asking  to  avoid  what the TEXT style does (i.e.
TRIM/LINES  on  your text), and you already have your faces built,
using layout is just overkill.

As  I  said  earlier,  you just need to set the TEXT facet to your
text, as in:

   face/text: "Multiline^/text"

View  does *not* remove that newline by default. Is the TEXT style
that does when used in VID without using AS-IS.

>> t: get-style 'text
>> print mold t/init
[
    if all [not flag-face? self as-is string? text] [trim/lines text]
    if none? text [text: copy ""]
    change font/colors font/color
    if :action [feel: svvf/hot saved-area: true]
    data: size
    if any [none? size size/x < 0 size/y < 0] [
        state: max 1x1 pane-size * 9 / 10 - offset - para/margin
        if none? size [size: state]
        if size/x < 0 [size/x: state/x]
        if size/y < 0 [size/y: state/y]
        size: size-text self
        all [
            para para/origin size: size + para/origin
            para/margin size: size + para/margin
        ]
    ]
    if all [data data/y < 0] [size/x: data/x]
    data: none
]

Notice the first line:

    if all [not flag-face? self as-is string? text] [trim/lines text]

HTH,
   Gabriele.
-- 
Gabriele Santilli <[EMAIL PROTECTED]>  --  REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

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

Reply via email to