[comp.sys.mac.programmer] Containing text, how?

john@basho.uucp (John Lacey) (05/03/91)

I have a standard text edit pane (using TCL, actually).  My problem is
that this pane does NOT scroll, so the text in its entirety must be
contained within it.

How can I stop the text from flowing past the end of the pane?  I
tried one method, where I checked the length of the current line
against the width of the pane.  That almost works.

It fails if the last character, or the first one past the end, is a
space, because the TextEdit manager will break the line there.  I
tried writing my own word break routine, but I needed to use nLines,
which was a moving target apparently, and I never got it right.

Any ideas (especially solutions :-) would be appreciated.  (Well,
"don't do that" isn't really appreciated, though it might be the hard
truth of the matter. 1/2 :-)
-- 
John Lacey         614 436 3773         73730,2250
john@basho.uucp  or  basho!john@cis.ohio-state.edu