uicomponent.measureText() and uicomponent.measureHTMLText(). Look them up in the docs for details.
- Daniel Freiman On Wed, Apr 23, 2008 at 11:17 AM, Denis <[EMAIL PROTECTED]> wrote: > Hi all, > > I need to measure the size of the number of text fields that come from > the XML to display them in a datagrid. The size of datagrid columns > depends on the width of the text records that come from the database > as the text cannot wrap so the columns should adjust if possible. The > logic is a bit complex since I need to know the width of all text in > all columns before distributing width among columns. > > How can I measure the width of the text without adding a child text > control to my parent object to measure the text. I would like to avoid > creating a dummy textbox in my container just to measure the width of > the text records but I did not find anything on the web that deals > with this. > > I was planning to measure the text width after the data is loaded > since it needs to be done only once. Can I create an "abstract" Text > object and measure the size of the text within it? I apologize for > awkward wording but I am not very experienced in Flex yet. > > Thanks in advance, > Denis > > >

