Solved

Autoresizing Container with its elements based on Browser size in Flex

Posted on 2011-09-13
7
329 Views
Last Modified: 2012-05-12
We have an Adobe Flex Application, in that we have some dynamic controls (like text control, Image control) on that container panel. When this application is loaded in Browser, based on the browser's height & width, the container is getting adjusted, because we have given the 100% for width & height. But the controls that is kept inside the container is not getting adjusted based on the size of the container panel. Please advise.
0
Comment
Question by:CGVAK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 29

Expert Comment

by:dgofman
ID: 36533060
If your control is not auto adjusting using 100% propertry you can refer to the parent control all application.

Example:

<mx:Application width="100%" height="100%">
  <mx:Canvas id="mycanvas" width="100%" height="100%">
      <mx:TextInput width="100%"/>
      <mx:TextInput width="{mycanvas.width}"/>
      <mx:TextInput width="{width}"

All these TextInput controls should get the same size
0
 

Author Comment

by:CGVAK
ID: 36533142
I hope this code will make the components to match the exact width of the canvas. But my need is, we need to do it proportionately. For example, we have set the Canvas size as 100% and when I open that canvas in 1024 x 768 resolution monitor, it gets adjusted to that and in that canvas the textinput control width should be 80px, and if I open the same application in another monitor with resolution 1370x1024 then the textinput control width should automatically resized to 150px width. Even if I resize the browser the textbox control should also adjust matching to the height & width of the canvas proportionately. Please advise.
0
 
LVL 29

Expert Comment

by:dgofman
ID: 36533436
u can use 80% 70% if you don't want calculate manualy
0
Major Serverless Shift

Comparison of major players like AWS, Microsoft Azure, IBM Bluemix, and Google Cloud Platform

 

Author Comment

by:CGVAK
ID: 36537254
Oh ok. Will try and this input controls has autoresize option. So, can we use the % for that too? Eg. this control has option to move around the canvas and option to resize and rotate. If it is based on the % i hope the left & top position of the control will be same. but that should perform based on the size of the canvas. Please advice how to achieve this.
0
 

Author Comment

by:CGVAK
ID: 36537570
The example URL is http://www.homestyler.com/designer and in this if you create a room and inside that room you can place a sofa and that soft will get adjusted based on the zoom. The same way we need to have it.
0
 
LVL 29

Accepted Solution

by:
dgofman earned 500 total points
ID: 36537999
Is that what are you codding?
You can always change size manually by listening RESIZE event
0
 

Author Closing Comment

by:CGVAK
ID: 37207152
Thank you for the help
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
With the rising number of cyber attacks in recent years, keeping your personal data safe has become more important than ever. The tips outlined in this article will help you keep your identitfy safe.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question