开发者

How to get the size/coordinates of the content area of Container objects?

How do I get the size of the content area of Container objects? One non generic solution is checking for styles I suppose but I am looking for some code that works generic for all standard flex Container objects.

Edit: The c开发者_StackOverflow社区ontrols are Flex 3


You mean other than simply doing container.width and container.height?

Edit from comment :

Ah ok.

Container has a mx_internal variable called contentPane which is a Sprite that you can get the width and height from.

import mx_internal;
use namespace mx_internal;
var containerWidth : Number = container.mx_internal::contentPane.width;
var containerHeight : Number = container.mx_internal::contentPane.height;
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜