热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Flex:在flex中隐藏组件时-Flex:whenhidingcomponentsinflex

WhenIsetacomponenttovisiblefalsethecomponenthides,buthowdoIgetittotakenospace(g

When I set a component to visible=false the component hides, but how do I get it to take no space (get the container it belongs to to resize??)

当我将组件设置为visible = false时,组件会隐藏,但是如何让它不占用空间(获取它所属的容器来调整大小?)


...



    
    

When boxAddComment is visible=false I want the first HBox to take 100% height.

当boxAddComment可见= false时,我希望第一个HBox占据100%的高度。

3 个解决方案

#1


32  

use the includeInLayout property. e.g.

使用includeInLayout属性。例如



...



    
    



#2


14  

Using includeInLayout ="true" or "false" will toggle the space that it takes in the flow of items being rendered in that section.

使用includeInLayout =“true”或“false”将切换在该部分中呈现的项目流中所占用的空间。

Important note: If you don't specify visible="false" when using includeInLayout = "false" then you will usually get something that is undesired which is that your item (boxAddComment) is still visible on the page but stuff below id="boxAddComment" will overlap it visually. So, in general, you probably want "includeInLayout" and "visible" to be in synch.

重要说明:如果在使用includeInLayout =“false”时未指定visible =“false”,那么您通常会得到一些不受欢迎的内容,即您的项目(boxAddComment)仍然可以在页面上看到但是ID =“ boxAddComment“将在视觉上重叠。因此,一般来说,您可能希望“includeInLayout”和“visible”同步。

#3


1  

Ross Henderson's suggestion in binding includeInLayout with boxAddComment.visible works great with Flex 3.0 but I found that it's not working in Flex 3.6 (I saw a posting that it actually stops working since Flex 3.3).

Ross Henderson建议绑定includeInLayout与boxAddComment.visible在Flex 3.0中运行良好但我发现它在Flex 3.6中不起作用(我看到一个帖子,它实际上自Flex 3.3以来就停止了工作)。

Just fyi.


推荐阅读
author-avatar
哇哈时候_206
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有