Page 1 of 1
How to change look of data grid column header?
Posted: Sat Aug 25, 2012 8:35 pm
by Ocean
How does one change the look of the column header of a data grid? For example, the colors of the background gradient (the property inspector only allows changing it to a flat color with no gradients), specifying a background image instead, and so on?
Re: How to change look of data grid column header?
Posted: Sat Aug 25, 2012 9:10 pm
by Zryip TheSlug
Ocean wrote:How does one change the look of the column header of a data grid? For example, the colors of the background gradient (the property inspector only allows changing it to a flat color with no gradients), specifying a background image instead, and so on?
Hi Ocean,
For changing the header color of a datagrid, it exists two datagrid properties:
- one for the header background: header background color
- one for the header background when the column header is hilited: header background hilite color
Usage:
Code: Select all
set the dgProp["header background color"] of grp "MyDatagrid" to pColor
Where MyDatagrid is the name of the datagrid
pColor is a single a color, two colors for defining a gradient (one color by line) or an array for a more complex gradient.
Have a look to the datagrid properties here:
http://lessons.runrev.com/s/lessons/m/d ... properties
Please, note the existence of the Data Grid Helper plugin, a product we created for editing properties of a datagrid in a few clicks. For this two properties, DGH allows the definition of a gradient color by using a convenient interface.
A free DGH version is available in the LiveCode market place:
http://www.runrev.com/store/product/dat ... per-1-2-0/
Best,
Re: How to change look of data grid column header?
Posted: Mon Apr 27, 2015 8:13 pm
by matthellstrom
I've downloaded DGH and it's awesome! So much help!
One question: is there a way to have 2 lines in the header on some columns?