On Nov 13, 2005, at 12:47 PM, MisterX wrote:
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! ;)
I don't think so, unless I'm being even denser than usual. If there's
no match at all, 'lo' will contain 0, so no scroll at all.
;)
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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
[email protected]
Please visit this url to subscribe, unsubscribe and manage
your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution