Data grid columns headers
sarah.reichelt at gmail.com
Sun Feb 21 06:11:48 EST 2010
I have to say that I haven't really taken to the data grid. I
recognise that it is an awesome piece of work from Trevor, but to me,
it's too difficult to use to be a true Xtalk thing. So I looked at the
tutorials in the beginning, but didn't actually implement it, except
in a very simple way that was mainly to take advantage of the column
Now I have an app that needs more sophisticated use of the data grid:
custom sorting, displaying icons in one columns, differing column
I have been working my way through what I need, referring to Trevor's
excellent lessons whenever I got lost. So I was able to implement a
custom sort and I have a variable image displayed in one column
(although I am having transparency issues).
My real problem came when I had a column with an image. The column
header was "Type" but the column data (one of a set of images) was
only 20 pixels across, so I wanted to reduce the header width to allow
the column to reduce to the minimum of 20 pixels. I naively thought
that setting the column header to empty would work, but this was a BIG
MISTAKE! DON'T TRY THIS AT HOME!!!!
This results in an un-editable column and every click throws a data grid error.
Now I have to go back to an archive copy - thankfully I use tRev which
archives regularly, but I know I have quite a bit of scripting that
will not be in the archives, so I will have to re-create that.
So, Trevor: it would be better not to allow an empty column header if
this is going to cause irretrievable errors.
And to everyone else: don't set data gird column headers to empty.
More information about the Use-livecode