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

Jan Schenkel janschenkel at yahoo.com
Wed Mar 5 07:39:01 EST 2003


--- "valetia at mac.com" <valetia at mac.com> wrote:
> Hi Jan,
> 
> I can't seem to get the patterns to line up properly
> with the textHeight of
> the field.
> 
> Do you have examples of combinations of pattern
> dimensions and textHeights
> that are known work together? (Or perhaps a method
> of calculating these?)
> 
> I've been trying to go with 16x16 since that's what
> the docs are
> recommending for cross-platform compatibility, but
> none of the textHeight
> integers seem to fit the patterns...
> 
> Valetia
> 

Hi Valetia,

Try changing the top margin of the field:

  put the margins of field "TheList" into tMargins
  if the number of items of tMargins = 1 then
    put tMargins & comma & "0" & comma & tMargins & \
        comma & tMargins into tMargins
  else
    put 0 into item 2 of tMargins
  set the margins of field "TheList" to tMargins

If that doesn't cut it, your best bet is to make the
field transparent, make a rectangle behind it, with
its backgroundPattern set correctly, shift it down a
bit and add a tiny extra rectangle at the top to
compensate for the offset of the textHeight ; then set
this 'top' rectangle's colour or background pattern
accordingly.

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



More information about the use-livecode mailing list