简体   繁体   中英

How to scroll view in Flex/Flash Builder?

I'm having problems srolling the content of a View that I've created in Flex/Flash Builder. When the content extends the screen I simply can't scroll to be able to see the rest.

What's the issue and how do I fix this?

I thought that clipAndEnableScrolling="true" would solve it but it didn't.

My code for the view with the content:

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
        xmlns:s="library://ns.adobe.com/flex/spark" title="Information">



    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->


    </fx:Declarations>

    <fx:Style source="style.css">
    </fx:Style>

    <fx:Script>
        <![CDATA[

            protected function button2_clickHandler(event:MouseEvent):void
            {
                // TODO Auto-generated method stub
                if (tabBarVisible){
                    tabBarVisible = false;

                } else {
                    tabBarVisible = true;
                }
            }



        ]]>
    </fx:Script>

    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>







    <s:actionContent>
        <s:Button label="Meny" click="button2_clickHandler(event)"/>
    </s:actionContent>

    <s:VGroup clipAndEnableScrolling="true" width="90%" height="90%" horizontalCenter="0" verticalCenter="0">

        <s:Button id="braAttVeta" width="100%" label="Bra att veta" styleName="knapp"/>
        <s:Button id="karen" width="100%" label="Kåren" styleName="knapp"/>
        <s:Button id="utskott" width="100%" label="Utskott" styleName="knapp"/>
        <s:Button id="kontakt" width="100%" label="Kontakt" styleName="knapp"/>
        <s:Button id="ordlista" width="100%" label="Ordlista" styleName="knapp"/>
        <s:Button id="overallskultur" width="100%" label="Overallskultur" styleName="knapp"/>
        <s:Button id="sponsorer" width="100%" label="Sponsorer" styleName="knapp"/>
        <s:Button width="100%" label="Button" styleName="knapp"/>
        <s:Button width="100%" label="Button" styleName="knapp"/>
        <s:Button width="100%" label="Button" styleName="knapp"/>
        <s:Button width="100%" label="Button" styleName="knapp"/>
        <s:Button width="100%" label="Button" styleName="knapp"/>
        <s:Button width="100%" label="Button" styleName="knapp"/>
        <s:Button width="100%" label="Button" styleName="knapp"/>
        <s:Button width="100%" label="Button" styleName="knapp"/>
        <s:Button width="100%" label="Button" styleName="knapp"/>
        <s:Button width="100%" label="Button" styleName="knapp"/>

    </s:VGroup>


</s:View>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM