scrolling to a line

MisterX b.xavier at internet.lu
Sun Nov 13 12:47:20 EST 2005


 
try select before line lo of me

or something like that, no that don't work in list fields

set the hilitedline of me to lo (0 works ok! ;)

;)

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Charles Hartman
> Sent: Sunday, November 13, 2005 17:08
> To: How to use Revolution
> Subject: scrolling to a line
> 
> I've modified Xavier's modification of my modification of
> (somebody's??) code to search incrementally in a sorted list field.  
> (This version, unlike Xavier's, assumes the whole line in the 
> field is the sorted item.)
> 
> But it doesn't solve one problem: suppose the user starts 
> typing a string that doesn't appear in the list? If the first 
> few letters match something, this scrolls to pretty close. 
> But suppose nothing starts with 'Q' and the user starts by 
> typing a 'q'? The list won't scroll at all. What would be 
> nicer would be to scroll to the place where an item beginning 
> with 'q' *would* be if there were one. I've only thought 
> about it for a few minutes, but it's already given me a 
> headache. Any clues?
> 
> local kTyped, lastKeyTime
> on keyUp theKey
>      if lastKeyTime is empty or the seconds - lastKeyTime > 3
>      then put theKey into kTyped
>      else put theKey after kTyped
>      put the seconds into lastKeyTime
>      put lineOffset(CR & kTyped, me) into lo
>      if lo is not 0
>      then set the scroll of me to lo * the effective 
> textHeight of me end keyUp
> 
> Charles Hartman
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage 
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list