-
posted by: martijn, at 3 August 2006 9:00 GMT+1, 7 January 2008 22:57 GMT+1
I'm working on a project which is using a lot of datagrids. Disregarding styling the datagrid is a masterpiece in usage.
But styling is a hell. First I wanted to give the header a new style. On the left and right side of the datagrid it should have curved corners. The header has, thanks to the briljant 9-slice-scaling, but why is there a background underneath?
Hmm there seems to be some strange lines between headers, overriding the movieclip (DataHeaderSeperator) with a new one in the library was no success. After a google and a search in the AS of the datagrid I came out with an Actionscript solution:
Flash Actionscript 2.0:
mx.controls.DataGrid.prototype._initHeaders = mx.controls.DataGrid.prototype.initHeaders
mx.controls.DataGrid.prototype.initHeaders = function(Void):Void{
this._initHeaders();
for (var i=0; i<this.columns.length; i++) {
this.header_mc["hO"+i]._visible = false
this.header_mc["sep"+i]._visible = false
}
}
mx.controls.DataGrid.prototype.drawHeaderBG = function(Void):Void{
var mc : MovieClip = this.header_mc;
mc.clear();
}
Not a very gracefull solution but it works. I'm still searching for a solution to make the background fully transparent.
1 Comment
Post a comment
lee says:
at 14 January, 2008 13:38 www.thefunkhouse.co.uk