开发者

What is the actual height of a container without scrollbars?

开发者 https://www.devze.com 2023-03-16 11:16 出处:网络
Probably a silly question but, what is the actual height of a container in Flex without scrollbars?Height开发者_StackOverflow中文版 and measuredheight seem to tell me what the visual height of a conta

Probably a silly question but, what is the actual height of a container in Flex without scrollbars? Height开发者_StackOverflow中文版 and measuredheight seem to tell me what the visual height of a container is, but I want to know that number plus any height that is being 'hidden" below a scrollbar.

Thanks.


You can get the height with this:

box.mx_internal::getScrollableRect().height;


HBox and VBox always resizes to it's children if I remember correctly. So the height/width property will always be that of the content within it.

As for SWFLoader, it acts more like a Canvas. If you want to get the width/height of the content, just use the contentHeight/contentWidth property. The height/width of SWFLoader should be the size of the "Canvas" and not it's children.

I believe for the scrollbar itself, only certain components do that (like canvas), and I believe the algorithm to add the scrollbar is along the lines of if contentHeight > height => add vertical scrollbar. The HBox and VBox shouldn't ever get a scrollbar, unless you specify the 'clipContent' property to true. I personally would steer away from using that and instead just wrap it in a Canvas.

0

精彩评论

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