iTunes-type alternate colored lines in scrolling list field (Jan Schenkel)

Greg Saylor gsaylor at net-virtual.com
Wed Mar 5 06:07:01 EST 2003


Hi Jan,

Sorry for a second email on the same subject -- hopefully this won't
cause confusion for you.. I did what you said below and it works except
that the pattern does not seem to scroll when the field scrolls...  Am I
doing something wrong or did I miss something important?..

- Greg

>Hi Valetia,
>
>There are two ways to go, depending on what you want.
>1) if you're okay with 'line-per-line' scrolling of
>your field, you can simply:
>- create a pattern in your favourite painting app
>- import it as an image
>- use the 'Colors' palette to set the
>backgroundPattern of the field to your imported
>pattern
>- set the script of the field to :
>  on scrollbarDrag
>    put the scroll of me into tScroll
>    put the effective textHeight of me into
>tLineHeight
>    if (tScroll MOD tLineHeight) is not 0 then
>      set the scroll of me to \
>          ((tScroll DIV tLineHeight) * tLineHeight)
>    end if
>  end scrollbarDrag





More information about the use-livecode mailing list