views:

24

answers:

2

I am creating a desktop application with Flex for the first time. I am having problems with the position and size of the elements in the screen. For instance

  • Elements with 100% width do not resize when the window is resized or maximized
  • Elements positioned relative to the bottom of the window do not move when resizing or maximizing the window

How do I solve these problems? Are there any good practices that I should follow when using Flex to develop a desktop app?

+1  A: 

from http://nondocs.blogspot.com/2007/04/flexfaqpercentwidthpercentheight.html :

If you set percentWidth and percentHeight of a UIComponent whose's parent is not a Container these properties may not effect the size of the UIComponent. This is because UIComponents do not actually check percentWidth and percentHeight. Instead the UIComponent's parent Container checks it's childrens' percentWidth and percentHeight and resizes the children accordingly.

splash
+1  A: 

Ok, I found what I needed in Adobe's official docs... I should have looked there in the first place:

Laying Out Components

One of my problems was that I was setting the width and height of the Application, and the Flash Player does not change that parameters even if you resize its window.

miguelSantirso