[REBOL] Re: Toggle area wrap on/off?
From: carl:cybercraft at: 3-Nov-2001 9:49
Hi Alan,
I see Alan's beat me with an answer, (you're up early for an
Australian on a Saturday morning Alan!:), but anyway, here's my
example, it being slightly different to Alan's...
On 03-Nov-01, alan parman wrote:
> How do I interactively change text wrapping in an area?
> I've tried changing face/para/wrap?
> and face/facets
> but with no luck.
> I'd like to have a toggle to turn wrapping on/off in an area.
Hmmm, well this works for me...
view layout [
a: area 100x50 "Here's some text, lots and lots of text."
t: toggle "Wrap Off" "Wrap On" [
a/para/wrap?: t/state show a
]
]
It may be that you've a lot of text and you're not setting line-list
to none before a show? That's quite a gotcha with View text areas.
Ie, with the above it should be...
a/para/wrap?: t/state a/line-list: none show a
I'm just guessing there though - line-list may not affect wrapping -
not sure...
--
Carl Read