Reputation: 65
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>
Upvotes: 0
Views: 1797
Reputation: 4877
Throw the VGroup in a Scroller. (http://help.adobe.com/en_US/flex/using/WSb04c7610c3432839-13869d09121418556f1-7ffc.html)
Upvotes: 1