tags:

views:

285

answers:

1

Hello

I have following code in my flex project.

<mx:Canvas id="scroller" styleName="myCanvas" width="635" horizontalScrollPolicy="off" y="60" height="370" >

        <mx:Canvas id="thumbContent" width="635" verticalScrollPolicy="off"
            horizontalScrollPolicy="off" y="0" backgroundColor="#00ff00" 
            backgroundAlpha="0" height="370"/>
     </mx:Canvas>

    </mx:Canvas>

I dinamically add different items to thumbContent canvas and use scroller canvas to scroll. I see than the height of thumbContent bigger than 7977 it truncate from scrolling. So - I see the scroller canvas with empty space on top. Then I scroll to bottom - I see the content of thumbContent and at bottom scrolling I see empty space too.

It looks like thumbContent is under hidden mask or something like that.

How I can solve that problem?

A: 

Looks like you want thumbContent to expand dynamically as you add content. In this case, you need to remove the height attribute from thumbContent, otherwise it will want to cram more content into it than it can hold, especially if the H and V scroll bars are off.

Keep the height attribute for scroller, though, because that's what you want to use to scroll (fixed dimensions).

Also, use percentages in your application. make thumbContent width="100%" if you want it to fill up the entire width of scroller.

Aethex