5 Replies Latest reply on Dec 15, 2006 2:34 PM by winzurf

    Automatic resizing of text / labels

    winzurf
      I want to have all text / fonts on my application resize proportionally as the window resizes - this is an instrument panel type of application. Can anyone point me to how this is done?
        • 1. Re: Automatic resizing of text / labels
          ntsiii Level 3
          See the docs for "constraint based layout".

          Tracy
          • 2. Re: Automatic resizing of text / labels
            winzurf Level 1
            Thanks. I've looked at constraint based layout - but my impression is it won't work on font sizes, just graphic elements - I want to create an 'instrument panel' where all the text etc. resizes with the window - most examples I've seen (ie the charting example) don't change the text size, just the other components.
            • 3. Re: Automatic resizing of text / labels
              ntsiii Level 3
              Sorry, I see that is what you are asking now.

              And I'm also sorry that that exceeds my graphical knowledge. Perhaps someone else will be able to help. Maybe google?

              Tracy
              • 4. Re: Automatic resizing of text / labels
                forty6n2 Level 1
                Did you find a solution to dynamically scaling the text as the window scales? I am having a similar problem. The only thing I have figured out so far is to load the text into an SWF and then load the SWF into an SWFLoader. The SWFLoader will then scale the text as the window scales, but this results in an unstable application because the SWF was compiled in AS2 from Flash 8. Let me know...Thanks!
                • 5. Re: Automatic resizing of text / labels
                  winzurf Level 1
                  I have ended up make a custom component which then attempts to set the font size based on the window dimensions - so far this has been a trial and error process and currently it doesn't handle variable aspect ratios, but it does work with limits. I'm still a hacker in Flex, I'm not even sure what or why some things are done as I hack example code to achieve what I want (don't have an OO background) - but having built some custom guages I just adapted this code. If you want I can prvide a few more details (I'm at home so don't have code handy)