Preserve Aspect Ratio in Flex Builder 3
Lately I’ve been diving deeper into Adobe Flex Builder 3 for developing Adobe AIR applications. It’s a great development environment especially if you have any experience with Eclipse (Flex Builder 3 runs as a plug-in for Eclipse). Despite my positive experience, I have encountered a few “oddities” with Flex Builder 3 such as how to preserve the aspect ratio when resizing images.
Click-n-drag to resize
Flex Builder 3 has a “design” view that allows you to drag and drop visual components into the application space making it easier to design your application (whether it be for the web or as a desktop application using AIR). Nearly all of these components can be “resized” by clicking and dragging the object handles to a desired size. Most times you can just “free hand” the click and drag but when it comes to something like an image, you might want to preserve its aspect ratio as you resize it which is easily done by holding down the shift key while you click and drag the object handles.
Click first and then shift
My experience with similar click-n-drag resize features in other applications always required that I hold down the shift key first, and then click and drag. In Flex Builder 3 the process is reversed. You need to click with your mouse on a resize handle FIRST, and then you press and hold the shift key. At this point you can begin to resize the image by dragging the handle of the image box. Once you have the size you want, simply release the mouse and then the shift key.
This tech-tip isn’t an earth shattering discovery; however, some people might not be used to the order in which you need to click, hold shift, and drag. Hopefully this little tip has helped someone overcome a minor aggravation.
Share, Bookmark, or Email this post
|
|
If you liked this post, subscribe to TechTraction's RSS feed or TechTraction's email feed
Filed under: How-To & Tech Tips
