Line numbers for soft-wrapped styled text?

Bob Sneidar bobsneidar at iotecdigital.com
Mon Mar 27 09:20:34 EDT 2017


Yeah I was thinking the same thing. textChanged triggers a handler that reformats the text every time. In essence, you are doing what a word processor would do. 

Bob S


> On Mar 25, 2017, at 09:07 , Mark Wieder via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> I looked into that for the glx2 script editor and gave up. Soft line wrapping by itself isn't a problem, and line numbering by itself isn't a problem, but there's no message generated that lets you know when wrapping is happening, and no indication in the text fields that a line has been wrapped.
> 
> The only ugly solution I could think of was to iterate through each of the lines of text, comparing the line length and character width with the length of the field, and flagging an overflow as a wrapped line. And do this every time the field got resized and text added or deleted. If you're dealing with a field with mixed styles then your problems are even worse.
> 
> -- 
> Mark Wieder
> ahsoftware at gmail.com





More information about the use-livecode mailing list