Hi there,
currently there's no possibility to align contents in table cells created via TableLayout cause the "bodyStyle" always is applied to the contained item instead of the cell itself.
I suggest to introduce
align
valign
tdStyle
as config options for table cell items. These would be applied directly to the table cell.
Here comes my code to apply these options:
Code:
Ext.layout.TableLayout.prototype.renderItem = function(c, position, target){
if(c && !c.rendered){
var td=this.getNextCell(c);
if (c.align) td.setAttribute("align",c.align);
if (c.valign) td.setAttribute("valign",c.valign);
if (c.tdStyle) td.setAttribute("style",c.tdStyle);
c.render(td);
}
};
I suggest to build in this feature directly into Ext.layout.TableLayout.
@ Jack / development team: I love your incredibly clear code!