Visible lines in a scrolling field.

Joe Lewis Wilkins pepetoo at cox.net
Fri Oct 14 01:20:32 EDT 2011


Ralph, 

I would perform some calculations based on the textHeight and scroll of the field in question. You should know how many of the field's lines are displayed so this should give you the vertical coordinates of the field; calculate the rect of the top line and select that rectangle. This should highlight the line. It may be a bit more complex than this, but something similar should work. I'm not sure where you should place the handler that does all of this; probably in an Open Card script? I don't know enough about the situation to help you any more.

HTH,

Joe Wilkins

On Oct 13, 2011, at 10:05 PM, Ralph DiMola wrote:

> Does anyone know how to find out what lines are currently visible in a field
> with a vertical scrollbar? More importantly can I find out just before they
> are scrolling into view so I can do some stuff to the line(s) just before/as
> they become visible? If I process all the lines (say for 2-3 hundred) it
> take waayyy too long for it to finish and the vertical scrollbar motion or
> highlighting 1 line will not happen until the entire list is processed. I
> put some constructive waits in and it reduces the problem but doesn't fix
> it.
> 
> Thanks
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> 




More information about the use-livecode mailing list