properties vs local variable

Peter Haworth pete at lcsql.com
Mon Mar 10 17:41:21 EDT 2014


There's another approach to this that does away with the need to set colors
at all.

Some folks on this list have shown me in the past how to create an image
with its fillgradient set in such a way that it has alternating lines in
the required colors at the same height as the line height you are dealing
with, then setting it as a backgroundpattern.

I've always used this in conjunction with a scrolling field with many lines
of data but it sounds this table is made up of many text fields, probably
grouped, so I tried it with a group of text fields..

Set the group's backgroundpattern to the id of the image.  Set the group's
opaque to true.  Set the opaque of the fields in the group to false.  All
works fine.  Group can be resized and the backgroundpattern adjusts
accordingly and you no longer need any code to set line colors except for
indicating the selectedline which I'd probably do with another image with
an appropriate background which gets positioned wherever the user clicks.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>



More information about the use-livecode mailing list