This content has been marked as final. Show 11 replies
In the API docs look up:
horizontalScrollPolicy and verticalScrollPolicy (set to "off" in your mxml)
Typically when a Flex app adds scroll bars, it's because there is still a component(s) that isn't being displayed in the app without the use of scroll bars.
Can you be more specific as to what is having scroll bars included on it? Is it your whole application? Or just a frame?
One thing to note is to check the width and height of your main application. If height and width is anything but a blank value or 100%, then this could certainly prompt your app to bring up scroll bars, especially if your dimensions are greater than your monitor's resolution.
ie, you made an app 1600x1280 but your PC's resolution is only 1024x768.
Give me some specifics though. What would be great is if you could just post a link to your app (it doesn't have to have any funcionality to it, just the front end Flex components) and then we can see where it's creating the scroll bars. By default, Flex will not create scroll bars for you unless there is excess components off-screen.
I have played around with this and it all depends on how you set up the length and width of your containers. I have had good success with setting my main container to width of 978 and not specifying the length. This keeps the width visible in a 1024 X 768 resolution. I then set my ViewStack resizeToContent property to true. The width of the children containers of the main container are then usually set to 100%.
I think he's talking about when the browser window is resized smaller than the minimum dimensions his app's UI will comfortably support. I'm guessing he wants to keep a specific width/height for the app overall.
"perflexed" <firstname.lastname@example.org> wrote in message
> When I view my application in the browser, the application has both
> horizontal and vertical scrollbars.
> How can I get rid of those? i.e. if the user's browser window is too small
> the app then I'm happy for the browser to do the scrolling.
In the html-template/index.template.html file change line ~77 to read <body
scroll="auto"> instead of the default which turns it off explicitly.
Amy doesn't that depend on if it's his browser that is adding the scroll bars or if it's the Flex app itself? They both have the ability to add scroll bars.
We don't really know the situation yet. I'm still waiting to SEE this example. My guess is the same as JB2622. Most likely a conflict in container sizes.
The scrollbars are being added by the player rather than the browser. So I can have my browser at 1900x1200 , with the width of the application container set at 1014 and I still get scrollbars.
Unfortunately the app isn't online anywhere for visual inspection.
I have about 6 components making up the layout and all of them have their width explicitly set to 1024, which is what has me puzzled.
I will try a few of the things suggested here and see if they help.
"EvolvedDSM" <email@example.com> wrote in message
> Amy doesn't that depend on if it's his browser that is adding the scroll
> or if it's the Flex app itself? They both have the ability to add scroll
> We don't really know the situation yet. I'm still waiting to SEE this
> example. My guess is the same as JB2622. Most likely a conflict in
He says he wants the browser to draw the scroll bars, not Flex.
Hope this clarifies;
When you have a bunch of nested containers it's easy to run into issues like this sometimes. The scrollbars may not be at the application level, it could be another container like a canvas. Try setting horizontalScrollPolicy and verticalScrollPolicy to "off" within various containers one at a time (starting at the Application level tag), eventually the scrollbars will vanish and you'll know which container is the offender. Maybe something is just one pixel too big...
"Ansury" <firstname.lastname@example.org> wrote in message
> When you have a bunch of nested containers it's easy to run into issues
> this sometimes. The scrollbars may not be at the application level, it
> be another container like a canvas. Try setting horizontalScrollPolicy
> verticalScrollPolicy to "off" within various containers one at a time,
> eventually the scrollbars will vanish and you'll know which container is
It also helps to set minHeight and minWidth, but I forget whether it is
better to set them to 0 or to the height and width property.
Perflexed can you take a screen shot and host it with imageshack or something?
Also, I recommend using percentages for containers inside your main app. Simply set the dimension of your main app and then let the containers reside within using percentage width and height. Flex will never let your containers grow larger than your app so long as percentages are being used (I believe).