开发者

How to prevent components from rendering in Flex

Is there a way to pr开发者_如何学Cevent a component from rendering in Flex (to save memory or processing power)?

I tried doing something like:

<components:AddNewItemGroup id="addItemGroup" 
            visible="false"
            enabled="false"
            horizontalCenter="0" bottom="0" />

I noticed that the component gets rendered but it's just not visible or functional.


If you want to prevent a component from being rendered, you need to remove it from the display list using the removeChild method in Actionscript.


How about setting "includeInLayout='false'" too ? The doc says it will not draw the component ... but maybe it will still "render" it ...

http://livedocs.adobe.com/flex/3/html/help.html?content=size_position_4.html


For the desired effect, use:

<components:AddNewItemGroup id="addItemGroup" visible="false" includeInLayout="false" enabled="false" horizontalCenter="0" bottom="0" />

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜