Bonsoir Yves,

LineOffset returns the number of lines between the beginning of a value and an occurrence of a specified string.
So, LineOffset does not take care of numbers or alpha chars and *stupidly counts the lines*. That's all :-)
So the code Klaus provided *should* work in all cases.
Your problem (I can't figure it) is elsewhere...
FixedLineHeight set to false?
Does not help to much :-(


Le 5 avr. 05, � 22:31, Yves COPPE a �crit :

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 ?

Amicalement,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch
----------------------------------------------------------------
Web site                http://www.sosmartsoftware.com/
Email           eric.chatonet AT sosmartsoftware.com/
Phone           33 (0)1 43 31 77 62
Mobile          33 (0)6 20 74 50 86
----------------------------------------------------------------

_______________________________________________
use-revolution mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to