1 Reply Latest reply on Apr 14, 2010 7:04 PM by David_F57

    Preventing scrollbars appearing when font size changes

    ustad1024

      Hi,

       

      I have a Panel container (relative layout with now height/width specified) containing text which has its font size determined at runtime from an external stylesheet. In my application, the user has the option to change font size (ie. load a separate external stylesheet). The problem is, whenever larger font sizes are chosen, horizontal and vertical scroll bars keep appearing within my panel container. I do not want this at all, I want the panel to resize!

       

      I've tried almost everything, including:

      • Calling "validateNow()" when font size changes
      • Launching a resize event when font size changes
      • Overriding the updateDisplayList method of Panel and trying to set the height and width to the newly measured height and width.

       

      None seem to be effective. It is as if the Panel does is not able to calculate the new size when the font size changes.

       

      Any help would be GREATLY appreciated.

       

      Thanks.