我在做一些程序化面板调整时发现了这个:
当火花面板中的组件位于物理面板边界之外时,它们仍然可见. mx面板不会发生这种情况.
当火花面板中的组件位于物理面板边界之外时,它们仍然可见. mx面板不会发生这种情况.
在Windows 7上运行Flex 4.1
我尝试在火花面板中放置mx和spark控件,它们都出现在边界之外.请注意,mx面板不会发生这种情况.
我错过了什么使火花表现得像mx?
谢谢 !
示例代码:
<?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <fx:Declarations> <!-- Place non-visual elements (e.g.,services,value objects) here --> </fx:Declarations> <s:Panel x="6" y="8" width="157" height="200"> <s:Label x="2" y="10" text="ABCDEFGHIJKL" width="258" height="35" textAlign="right"/> <mx:Label text="Label" x="232" y="55"/> <mx:Button x="125" y="96" label="Button"/> </s:Panel> <mx:Panel x="10" y="216" width="200" height="200" layout="absolute"> <mx:Label x="0" y="46" text="Label" width="217" textAlign="right"/> <mx:Button x="163" y="88" label="Button"/> </mx:Panel> </s:WindowedApplication>
解决方法
您可以在其中放置一个s:Group并设置clipAndEnableScrolling =“true”.它与CSS的溢出非常相似:隐藏.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。