views:

13

answers:

1

I am writing a Flex (Flash Builder) application which has a map component (http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/Map.html) and a drop down list component used to select items shown on the map. I want the drop down list component to always be overlayed on top of the map in the top right corner, regardless of the size of the window that the application is displayed. If I use an x and y setting for the drop down list component then it is good only for a certain window resolution, and instead I want the drop down list component to always "float" along the top right corner regardless of the size of the browser window (i.e. if the user resizes the browser window then the drop down list component will remain fully visible in the top right hand corner). Is it possible to do this, and if so how?

Thanks in advance for your suggestions.

--James

+1  A: 

Instead of using the x and y properties, use the top andright` properties.

These will specify how far from the top and right edges you want the component to be.

If you just use top and right you can also use height and width. If you want the size of the component to scale with the size of the screen, you can use left and bottom as well to cause it to scale to maintain those distances as well.

Alan Geleynse
Beautiful, this is exactly what I was looking for. Thanks so much for your help!
James Adams