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.
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.
本文详细解释了组件在父容器布局中的可见性和布局包含属性的使用方式,包括设置visible和includeInLayout为false和true的情况,以及它们对组件显示和位置的影响。
970

被折叠的 条评论
为什么被折叠?



