Determining a scroll based on code unit offsets
J. Landman Gay
jacque at hyperactivesw.com
Fri Mar 27 13:58:02 EDT 2020
In our last episode, our heroine was trapped by the selection of a line
containing metadata. The heroes of this group saved her. In all cases,
scrolling the field was accomplished by using the "select" command to bring
the line into view.
Alas, escape from one danger has led to another. The field itself must be
inside an enclosing group so that it will scroll smoothly on mobile. She
needs to translate the data from codeunits to a scroll position in order to
set the group's scroll rather than the field scroll.
Each line of the data looks something like this:
While 7 is a line number, multiplying that by the textheight doesn't give
consistent results due to line wrap. The first two items are codeunit
offsets but there doesn't seem to be a way to translate those into pixel
Our heroine is once again in distress, though as mentioned here, some of
that may be due to the inability to reach the keyboard from 6 feet away,
which presents its own positioning problems.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode