I need to scroll by line a field with Lyrics whose lines have different heights.
(FixedLineHeight to false / DontWrap to true)
I think the key is to find the height of each line ... but how do I get?
I plan to use a second field and textHeightSum function but does not seem to work well.
Any Idea, Please ?
Code: Select all
on mouseup
/*160620-1925 ckaron: main field - ckClon: secondary field.*/
set the vScroll of fld cKaron to 0
repeat with theLine = 1 to 10
wait 120 ; if the mouse is down then exit to top -- Time to see the effect and optional exit
set the htmlText of fld ckClon to the htmlText of line theLine of fld ckaron -- Text with Styles
put the textheightSum of fld ckClon into theHeight -- ¿Not seem to work this value?
set the vScroll of fld cKaron to the vScroll of fld cKaron + theHeight
end repeat
end mouseup