How to determine someone has finished scrolling a field

Brahmanathaswami brahma at hindu.org
Sun Nov 8 16:52:17 EST 2015


OLD question.

What is the algorithm for determining if someone has scrolled all the 
way to the end of the text of a field with overflow text?

Another way to say this is: what is the relationship to the vScroll and 
formattedHeight?

I'm testing with this

where the factor "195" is somehow related to the field height
(which is 178 px high plus the some value related to the lineheight or 
font size)

But this seems to work...

function checkScrollDone
    put the formattedHeight of fld "quote" into tTextHeight
    put the vScroll of fld "quote" into tVscroll
     put tTextHeight - tVscroll into tBalanceToScroll
  put tBalanceToScroll
    if tBalanceToScroll < 195 then
         return   "true"
    else
       return  "false"
     end if
end checkScrollDone


BR




More information about the use-livecode mailing list