Find Scroll position of a chunk within a line that is wrapped

Michael Doub mikedoub at gmail.com
Tue Nov 18 13:23:26 EST 2014


A related question to positioning a line within a field, is positioning 
a chunk within a line that is wrapped.   I am stumped on this one and it 
may need engine support.   I don't know how to figure out the scroll 
value of something in the middle of a wrapped line.   In the thread 
discussing scroll positioning within a wrapped field we see how to find 
the top.   I figured out how to get the bottom using James Hales 
approach. (code in the forum and MasterLibrary)

Does anyone see a way to calculate the scroll position of a chunk within 
a line that is wrapped?

Regards
   Mike



On 11/18/14 1:01 PM, Richard Gaskin wrote:
> Michael Doub wrote:
>
> > I don't think the solution works because of a bug in livecode where
> > spacebefore and spaceafter are not taken into account.
>
> Thanks - I wasn't aware of that bug, but was able to find it:
> <http://quality.runrev.com/show_bug.cgi?id=11688>
>
> Hopefully it'll get addressed for 6.7.1 and 7.0.1, since it's needed 
> for a wide range of tasks relating to text metrics.
>





More information about the use-livecode mailing list