Usage of IncludeInLayout

阅读更多
Specifies whether the component is included in the layout of the parent container, if true, the object is included in its parent container’s layout. If false, the object is positioned by its parent container as per its layout rules, but it is ignored for the purpose of computing the position of the next child.

Note: no matter what value you set to the visible and includeInLayout, the component has already created; it is different with components in state, when the state has not been set, the components in the state have not been created, and therefore you cannot access them before changing to that state.
  1) Set visible=false will hide the component, but the components’ position is already calculated , so you will see gaps or space representing that component, should not use this way.
  2) Set Visible=false and includeInLayout=false will not only hide the component but also ignore the space occupied by component, so this is a right and good way to hide a component, similar to the hide tag in html.
  3) Set Visible=true and includeInLayout=false will display the component on stage, but it will override or overlap the space occupied by another existed component, so you should not use this way.

你可能感兴趣的:(flex,IncludeInLayout,hide,state)