?
Solved

Autoresizing Container with its elements based on Browser size in Flex

Posted on 2011-09-13
7
Medium Priority
?
331 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
[Video] Oticon Case Study

Open office environments can create the dynamics for innovation, but they also bring some challenges. With over 1,000 employees in an open office, Oticon needed a solution that would preserve the environment while mitigating disruptive background noises.

Watch how they did it.

 

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 1500 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

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

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…
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

719 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