Is there anyway I can effectively call the equiv. of setText on a Flex Graphics object ?
Specifically I'm using a custom cell renderer to display data in a datagrid. The renderer uses the Graphics object to set the background colour of only a portion of the cell (say the left half) based upon the underlying data. I would like to be able to have text over only that portion of the cell which has the background colour (eg centred within the left half).
I know all the widths (of both the cell itself and the graphics object) but I don't know how I can set text (centred) over the graphics object.
Anyone got any ideas pls?
Tks vm
Best Answer
Here's a solution that avoids adding UI components:
The idea is to use the UITextField to create a bitmap, that can be used with the graphics object to fill a rectangle.
This is based on a blog post by Olga Korokhina at Adobe Developer Connection.