Selecting text in fields - scroll behavior

Scott Rossi scott at tactilemedia.com
Wed Aug 13 19:34:01 EDT 2003


Recently, "Jim Witte"  wrote:

>  I want to select some text in a field.  I've using
> 
> select char startChar to endChar of fld "fCode"
> 
> where fCode has the List Behavior property set.  It works, but if I
> tell it to select a range that isn't in the current scroll range, it
> scrolls so that the *bottom* of the selection is visible, and I'd like
> the *top* (and the whole thing) is visible.  Is there a way to do this.
> 
>  Or is there a better way to do text hiliting like this.  I only need
> to select whole lines, so I first tried "select line x to x".  This
> works (but only if list behavior is turned on), but I need a way to get
> the line numbers out of matchChunk, which only returns character
> offsets..  So I'm back to selecting characters.

Did you try setting the hilitedLines of the field?  Can you use the
lineOffset function?

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com




More information about the use-livecode mailing list