tags:

views:

917

answers:

3

Im currently learning Flex, and Im having the hardest time getting scroll bars to work. In short Im pretty much just making a giant form for users to fill out, contained within a viewstack component, the user will type up information in one view, and it will be displayed in the other. But right now in the first canvas i have components that run of the screen and flex doesnt seem to automate a scroll bar, so i added in 'verticalScrollPolicy="on"' to my canvas, now while it gives me a scroll bar, it gives me an empty scroll bar, I still cannot move it up or down, meaning components are still trapped off the bottom of my screen. Im I missing something amazingly simple?

Edit - Sorry, Im using Adobe Flex Builder 3, and the components it lets you drag in. http://img12.imageshack.us/img12/218/problem1f.jpg This is a picture of the problem, and i guess relavent code would be.

 <mx:Application xmlns:mx="adobe.com/2006/mxml"; layout="absolute" width="830" height="835"> 
<mx:ViewStack x="10" y="72" id="viewstack1" width="790" height="751" >

<mx:Canvas label="Design Mode" width="100%" height="100%" verticalScrollPolicy="on" horizontalScrollPolicy="on" >

(Components inside)

</mx:Canvas>

Sorry if Im using this site wrong, still very new

A: 

I am not sure with ur problem.. but I just want to tell u a adhoc probable solution(it may work)

set

try this is and let me know..

please post ur full work next time

dhanasekar
I think you're missing some code here.
quoo
A: 

I think the problem is in the way the content in your canvas determines it's height.

If I do this:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:ViewStack width="500" height="500">
     <mx:Canvas width="100%" height="100%">
      <mx:Canvas width="100" height="1000" backgroundColor="#ededed" />
     </mx:Canvas>
    </mx:ViewStack>
</mx:Application>

I get scrollbars - Canvas has a default horizontalScrollPolicy and verticalScrollPolicy of auto, meaning it'll show the scrollbars as needed. I think, for whatever reason, the outer canvas isn't detecting that the content is taller than it should be.

quoo
A: 

if it can help some one : some related problem

LE GALL Benoît