Skip to content

Flex vs FlexJS visibility of components

ok-at-github edited this page Aug 10, 2017 · 7 revisions

Classic Flex

If you set the visible property of a component to false it is still included in its parent container which means that it's invisible but still take up space. We're used to setting the includeInLayout property to true or false to specify whether this component is included in the layout of the parent container or event not:

<s:Label text="Hello World" visible="false" includeInLayout="false"/>

FlexJS

If you set the visible property of a component to false it is invisible and also excluded from the layout of the parent container and so it takes no space.

<js:Label text="Hello World" visible="false"/>

Clone this wiki locally