fixed textheight affects scrolling?
Klaus major-k
klaus at major-k.de
Thu Jul 9 04:54:13 EDT 2020
Hi all,
> Am 08.07.2020 um 17:51 schrieb Klaus major-k via use-livecode <use-livecode at lists.runrev.com>:
>
> Hi friends,
>
> strange phenomenon, maybe I am missing something!?
> LC 9.6 on macOS 10.14.6
>
> I have two fields with all available fonts and each line is formatted directly
> in the appropriate font it reads.
>
> I set the FixedLineHeight for ONE field to 28, doesn't matter actually.
>
> Now I want to select a specific line in the fields with this script:
> -------------------------------
> on mouseUp pMouseButton
> set the wholematches to TRUE
> put lineoffset("Lucida Grande",fld "fonts") into tLine
> ## Which is 366 in my fields!
>
> put the effective textheight of fld "fonts" into tTH
> set the scroll of fld "fonts" to tLine*tTH + the height of fld "fonts"
> set the hilitedlines of fld "fonts" to tLine
> end mouseUp
> -------------------------------
>
> Works fine for the field WITHOUT fixedlineheigt and selects the line -> Lucida Grande
> However the same script used with the field WITH fixedlineheight, it selects -> Lucida Grande Bold
> which is the line AFTER "Lucida Grande" and actually line 367!?
>
> What am I overlooking?
> Thanks for any hints!
Ideas? Anyone? No?
Best
Klaus
--
Klaus Major
https://www.major-k.de
klaus at major-k.de
More information about the use-livecode
mailing list