开发者

Can you get a menu item's width before displaying the menu item in flex?

I'm trying to get the menu width of a menu item in flex 4. I can get it but I have to show the menu first, then hide the menu, do a calculation, and show it again. Is there an easier way t开发者_运维问答o get the item menu width without this hassle?


Have you tried validateNow()?

For more info, check out:

http://www.judahfrangipane.com/blog/2008/09/07/what-is-validatenow-and-why-you-should-know/ http://www.developmentarc.com/site/sites/default/files/understanding_the_flex_3_lifecycle_v1.0.pdf (PDF)

Edit: Take a look at TextLineMetrics: http://blog.grio.com/2009/10/wrangling-flex-labels-autosizing-text.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜