Determining text size on UIComponents

I want to know how wide a particular String would be if it were displayed in a List or DataGrid so that I can set the component’s width sufficient to accommodate my String.

In Flex there is a handy method UIComponent.measureText(text:String):[URL=“http://www.kirupa.com/forum/…/…/flash/text/TextLineMetrics.html”]TextLineMetrics.

However there seems to be nothing comparable in the Flash UI components.

It doesn’t even seem possible to determine what TextFormat is governing a UIComponent: calling getStyle(“textFormat”) on a List or DataGrid instance returns null.

Is there any reliable way to discover what TextFormat currently applies in a List or DataGrid?

Thanks
Andy