Working with words and text
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Working with words and text
How can I scroll down a list (in alphabetical order) to the corresponding position of a word being typed in a second field? (i.e. as I type a word into "field1" the list on "field2" is scrolled to the corresponding letter typed. FIRE --- When "F" is typed the list goes to the first word starting in "F", when "I" is typed ("FI") then it moves to the first word starting in "F" followed by "I", and so forth....)
Re: Working with words and text
Hi.
Many ways to do this. Try, in the field script:
Now you have to make sure that there is a valid textHeight property in your field. This is not necessarily set by default. Why test after three chars? What about backspacing? Why knock off one line in the scroll? Could you do this with the "find" command? Why so many questions?
Craig Newman
Many ways to do this. Try, in the field script:
Code: Select all
on keyUp tkey
if the length of me >= 3 then
get lineOffset(me,fld 1)
put it && it * the textHeight of fld 1 --just to see what is going on
set the scroll of fld 1 to it * the textHeight of fld 1 - the textHeight of fld 1
end if
end keyUpCraig Newman
