Locating a line in a scrolling list field
Klaus on-rev
klaus at major.on-rev.com
Sun Nov 11 11:46:40 EST 2012
Hi Pete,
Am 11.11.2012 um 17:41 schrieb Peter Haworth <pete at lcsql.com>:
> I have a need to determine the pixel location of the hilited line in a
> scrolling list field when the user clicks on it.
>
> Let's say that the field is deep enough to display 10 lines and that there
> are 500 total lines in the field. The hilitedline property is relative to
> the total number of lines (500), not the line number within the 10
> currently displayed.
>
> I seem to remember seeing something about this on the list in the past but
> haven't been able to turn anything up with a search and my spacial geometry
> skills are pretty close to zero so any pointers would be gratefully
> appreciated!
maybe something like this will work for you?
Just tested this with a listfield:
on mouseUp
put the formattedrect of line(the hilitedline of me) of me
end mouseUp
> Pete
> lcSQL Software <http://www.lcsql.com>
Best
Klaus
--
Klaus Major
http://www.major-k.de
klaus at major.on-rev.com
More information about the use-livecode
mailing list