Scrolling flds

Yves COPPE yvescoppe at skynet.be
Tue Apr 5 16:31:35 EDT 2005


Hi list,

I have a fld with an alphabetical list

I have a script to automatically scroll the fld at the beginning of a 
clicked letter : tKey

(thank you Klaus)

  put lineOffset(return & tKey, fld "body") into lo
  set the scroll of field "body" to (lo * the effective textHeight of 
field "body")



now, I have a problem :

the list fld begins with a variable number of lines which are numbers 
and then begins the alphabetical list

so, to set the scroll of field "body", I have to add some variable 
number to (lo * the effective textHeight of field "body")

I cannot find out how I have to calculate this correction

i've tried :

put lineOffset(return & "a", fld "body") into tcorrection
set the scroll of field "body" to (lo * the effective textHeight of 
field "body")+ tcorrection

it's good at the beginnning of the list fld but after some lines, it's 
not correct anymore

where is the error ?

Greetings.

Yves COPPE
yvescoppe at skynet.be


More information about the use-livecode mailing list