aspose file tools*
The moose likes Flex and the fly likes placing the controls/components using the Percentage facility Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "placing the controls/components using the Percentage facility " Watch "placing the controls/components using the Percentage facility " New topic
Author

placing the controls/components using the Percentage facility

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

This question is about placing the controls/components using the Percentage facility .

From Adobe it is mentioned that :

"You specify the component size as a percentage of its container size. To do this, you specify the percentHeight and percentWidth properties, or, in an MXML tag, set the height and width properties to percentage values such as 100%. "

Can anybody tell me how is this approach different from the normal height and width of a Component ?? and

How can we deteremine the percenategheight and percentagewidth for a component . For example in below example the author has taken as shown :

<mx:HBox id="hBox1" xmlns:mx="http://www.adobe.com/2006/mxml"
height="30%" width="90%"/>

My question is how can we know that heights value and widths value should be 30 and 90 respectively ??

Please let me know this , Thanks in advance .

Save India From Corruption - Anna Hazare.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


My question is how can we know that heights value and widths value should be 30 and 90 respectively ??

Try it and see what it looks like?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: placing the controls/components using the Percentage facility
 
Similar Threads
Height and Width In percentage
What is the unit of parameters????
Location and bounds of a component object
Can anybody help??
ideas wanted on making this custom JTable cell renderer more efficient