If you want a line of text in a datagrid cell to end with an ellipsis (...) when it's too long for its cell, you can set the column's item renderer to be "mx.control.Label" and that works. The entry looks like this:
Here is my line of dat...
But here's my problem.
I have created my own item renderer which is an HBox containing an image and a label. But the label doesn't truncate with the ellipsis ... when the data is too long, it simply chops the end off the displayed text.
So my question is this. How can I get the ellipsis ... to appear for the label in my item renderer? I'm using a datagrid with scaleable column widths so I can't set a fixed width on the label which would work, I know.
Try setting minWidth=0 on the Label in the HBox
Thanks for your suggestion.
It didn't work but inspired me to play around with minWidth and maxWidth.
What I eventually got to work was:
...on the Label in the HBox. I'm assuming that "this" here refers to the ItemRenderer.
I had to put in the "-28" bit or it wouldn't do it. If you want more padding on the right of the ellipsis (so it doesn't hit the edge of the cell) increase the 28 to something higher. Use a lower value for less padding.
Hope this helps someone else like it did me.