加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flex4 application设置滚动条

发布时间:2020-12-15 00:58:41 所属栏目:百科 来源:网络整理
导读:flex4 application设置滚动条--不过需要注意不要设置application的minwidth而是 设置第一个容器的minwidth 最正?的作法是用 Application Skin Class 在 Content Group 外包一? Scroller 就好了 http://butterfliesandbugs.wordpress.com/2009/03/13/how-to-a

flex4 application设置滚动条--不过需要注意不要设置application的minwidth而是

设置第一个容器的minwidth
最正?的作法是用 Application Skin Class
在 Content Group 外包一? Scroller 就好了
http://butterfliesandbugs.wordpress.com/2009/03/13/how-to-add-a-scrollbar-to-a-gumbo-application/

这个是在别处看的,不过这个地址好像不能用了,附上皮肤类的代码

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2010/11/03/adding-scroll-bars-to-an-spark-application-container-in-flex-4/ -->
<s:Skin name="MyApplicationSkin"
??xmlns:fx="http://ns.adobe.com/mxml/2009"
??xmlns:s="library://ns.adobe.com/flex/spark"
??xmlns:fb="http://ns.adobe.com/flashbuilder/2009" ??alpha.disabledStates="0.5"> ?<!-- states --> ?<s:states> ??<s:State name="normal" stateGroups="normalStates" /> ??<s:State name="disabled" stateGroups="disabledStates" /> ??<s:State name="normalWithControlBar" stateGroups="normalStates" /> ??<s:State name="disabledWithControlBar" stateGroups="disabledStates" /> ?</s:states> ? ?<fx:Metadata> ??[HostComponent("spark.components.Application")] ?</fx:Metadata> ? ?<fx:Script fb:purpose="styling"> ??<![CDATA[ ???override protected function updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void { ????super.updateDisplayList(unscaledWidth,unscaledHeight); ???} ??]]> ?</fx:Script> ? ?<!-- fill --> ?<!--- ?A rectangle with a solid color fill that forms the background of the application. ?The color of the fill is set to the Application's backgroundColor property. ?--> ?<s:Group left="0" right="0" top="0" bottom="0"> ??<s:layout> ???<s:VerticalLayout gap="0" verticalAlign="middle" /> ??</s:layout> ??<s:Scroller id="contentScroller" width="100%" height="100%"> ???<s:Group id="contentGroup" minWidth="0" minHeight="0" /> ??</s:Scroller> ?</s:Group> ? </s:Skin>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读