At 10:33 AM -0700 8/17/2001, Kelly Franznick wrote:
>Can anyone point me to documentation explaining how to scroll to a line of a
>field that a user has specified in another field?
>
>What I'm trying to do mirrors the "Scroll To" function at the top of the
>Transcript Language Dictionary.
You can take a look in that field's script to see how it's done (make sure
"Contextual menus work in Rev UI stacks" is turned on in Preferences, then
command-control-option-click or control-option-rightclick the field and
choose "Edit Script").
Here's the basic idea, some variation of which will be in the Cookbook:
put lineOffset(return & field "Find", field "List") + 1 into currentLine
if currentLine > 1 then set the scroll of field "List" to \
(currentLine - 1) * the effective textHeight of field "List"
"Find" is the field the user types into, and "List" is the scrolling field.
The lineOffset function is used to find the number of the first matching
line. The necessary scroll for that line is the line number (minus 1, since
we want to scroll so the top of the field is the baseline of the previous
line) times the field's text height.
--
Jeanne A. E. DeVoto ~ [EMAIL PROTECTED]
http://www.runrev.com/
Runtime Revolution Limited - Power to the Developer!