Roger Eller
Roger Eller

Reputation: 113

I wish to apply a background color to ONLY the cells in a specific dataGrid column?

I asked this question on the LiveCode email list. No response, so I figure it must not be possible. I know about editing the template graphic that enables alternating row colors. That doesn't help me.

This lesson is the closest to what I have found, but it only sets the overlay color to empty cells. It also had an unwanted affect, where any data that was present in the grid no longer shows up.

http://lessons.runrev.com/s/lessons/m/datagrid/l/7327-how-do-i-override-the-default-behavior-for-rendering-data-to-a-cell

As a little experiment, since the data became invisible (note that I'm on WinXP), I tried placing an opaque graphic over the column I wish to colorize. I set the ink of the graphic to AddMax or AddOver, and it looked nice, but the text in the cells disappeared. Then I tried setting the ink to AddMin, and it still looks good, but the test shows through!!!!

So, I think this will work fine visually, but how can I pass a double-click through this graphic to the cell underneath (to allow cell editing only within this column)?

Upvotes: 2

Views: 534

Answers (1)

Benjamin Beaumont
Benjamin Beaumont

Reputation: 910

Yes, you can do this.

This suggestion comes from Trevor DeVore at http://www.bluemangolearning.com/

Create a custom column template using the property inspector. From there you can edit the behavior of the column to colorize the background color of the field for that column or just edit the field in the template group to change the color.

The background color will only show up in rows that have data, however.

Upvotes: 1

Related Questions