Reputation: 2684
Hi I'm extending the Flex 3 panel component. I need to figure out the width of the title's text. Because, title is a private variable in panel, I can't access it via title.width.
I know the font, fontsize (14), and length of the title (which will vary). Knowing this info is there a way to calculate how many pixels wide the title is?
Upvotes: 1
Views: 311
Reputation: 13620
titleTextField
is a protected property.You can use it to calculate the textwidth right.
Can you try this and let me know if it works?
measureText(titleTextField.text).width
Upvotes: 1