开发者

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

开发者 https://www.devze.com 2023-01-08 17:28 出处:网络
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 Contai

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

精彩评论

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