Groups | Blog | Home
all groups > flash data integration > december 2005 >

flash data integration : Datagrid - how to vertically center text in a cell


James Fee
12/19/2005 1:10:12 PM
In your cellRenderer class, do you have a 'size' function? if not, then you
can implement one. this function gets called whenever it is drawn or
resized. In it you can set the relative '._y' value of your text box.

--
Jim Fee
Viking Electronic Services
jfee (at) vikinges (dot) com


[quoted text, click to view]

Thelonious Funk
12/19/2005 5:52:28 PM
By default, the datagrid will display data in the vertical center of each cell,
but when I apply the htmlCellRender all the data appears at the top of each
cell.

I used the htmlCellRenderer to add some text to the end of xml data in a
column (added "watts" to the dynamic data "600" to end up with "600 watts". It
works fine, but now this column of data is displayed at the top of each cell in
that column. It doesn't line up with the rest of the data in the row. Driving
me nuts.

Through the style sheet, I can change the font, color, horizontal alignment,
but can't get it in the vertical center of the cell.

Anyone been through this?
AddThis Social Bookmark Button