Solved

Autoresizing Container with its elements based on Browser size in Flex

Posted on 2011-09-13
7
316 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
  • 4
  • 3
7 Comments
 
LVL 29

Expert Comment

by:dgofman
Comment Utility
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
Comment Utility
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
Comment Utility
u can use 80% 70% if you don't want calculate manualy
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:CGVAK
Comment Utility
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
Comment Utility
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
Comment Utility
Is that what are you codding?
You can always change size manually by listening RESIZE event
0
 

Author Closing Comment

by:CGVAK
Comment Utility
Thank you for the help
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now