This content has been marked as final. Show 7 replies
When you say that you are anchoring to the centerline of the page, do you mean that you are using the horizontalCenter style of the component and setting it to 0. What are the other attributes of this component that you are centering (e.g. width attributes?). Please post some sample code to help us understand your problem.
Flex SDK QA
There is not just one component, there are many, and their attributes vary. I am using the horizontalCenter style. For some components it is set at 0, some at positive numbers, and some at negative numbers. I am trying to get all of the elements aligned properly relative to eachother and the center of the page. Attached is a sample of the problem. When viewed in a large enough browser screen, it's fine, but when the browser screen is reduced, items on the left get cut off, and you cannot scroll left to view them.
I filed a bug for you at:
Although it won't get you around this bug, I wanted to point out that you can simplify your MXML quite a bit by nesting the objects in a centered container:
I just saw that fixing this bug has been deferred. I would think since display consistency accross platforms is one of flash/flex's selling points this would be high priority. Many people out there still set their monitors to 800x600 (obviously nobody at Adobe...), even when the monitor is capable of higher resolution. It would be a shame to have to choose between not getting the design you want or having part of your application completely unviewable by anyone with a 800x600 display.
At least there should be a work around... I've tried using spacers and containers in different configurations, but still can't get it to work. Any ideas?
As a possible alternative, is there a way to make a container's size relative to the size of the browser window, but still have a minimum width?
After taking a fresh look at the problem again tonight, I finally found a work around/solution that does what I want: Give the application a vertical layout, then place everything in a container with an absolute layout.
Thanks for posting your workaround! We will allow voting on deferred bugs very soon, so you and others in the community will have the power to raise the priority of this issue.