[flex_india:29605] percent width into pixels dynamically

14 views
Skip to first unread message

DME Admin

unread,
Apr 20, 2010, 5:22:57 AM4/20/10
to flex_...@googlegroups.com, sanm...@gmail.com, DME Admin
In my app i am having a tab navigator which has two tabs with canvas containers as its contents namely Active Reports and Reports/Expense Details. Based on the canvas width i am doing certain UI manipulations. when i access the availableExpensesCanvas width(availableExpenseCanvas.width) in action script it is showing it as zero. Able to get the value when i access it as availableExpenseCanvas.percentwidth. The issue it is directly showing it as percentage value. I.e it will show 100 when is set width as 100% in mxml.

how to convert percent width into pixels dynamically?

code snippets

<mx:TabNavigator id="tn" borderStyle="solid" tabHeight="25"  width="100%" height="100%"  creationPolicy="all" change="initializeAvail()">  
   <mx:VBox label="Active Reports" toolTip="Active expense reports display">  
     <mx:Canvas id="reportsListCanvas" width="100%" height="100%"  >  
    <containers:ActiveExpenseReportsForm id="activeExpenseReportsForm"/>  
     </mx:Canvas>  
   </mx:VBox>  
                       
   <mx:HBox label="Report/Expense Details" width="100%" height="100%" horizontalGap="0" verticalGap="0"  
            toolTip="Available expenses display" >  
                  
        <mx:Canvas id="availableExpensesCanvas" width="100%" height="100%" >  
        <containers:AvailableExpenseForm id="availableExpensesForm"/>  
        </mx:Canvas>  
                      
   </mx:HBox> 



<mx:TabNavigator id="tn" borderStyle="solid" tabHeight="25"  width="100%" height="100%"  creationPolicy="all" change="initializeAvail()">
   <mx:VBox label="Active Reports" toolTip="Active expense reports display">
     <mx:Canvas id="reportsListCanvas" width="100%" height="100%"  >
	<containers:ActiveExpenseReportsForm id="activeExpenseReportsForm"/>
     </mx:Canvas>
   </mx:VBox>
			         
   <mx:HBox label="Report/Expense Details" width="100%" height="100%" horizontalGap="0" verticalGap="0"
           	toolTip="Available expenses display" >
	            
       	<mx:Canvas id="availableExpensesCanvas" width="100%" height="100%" >
		<containers:AvailableExpenseForm id="availableExpensesForm"/>
        </mx:Canvas>
					
   </mx:HBox>

thanks
dme

--
You received this message because you are subscribed to the Google Groups "Flex India Community" group.
To post to this group, send email to flex_...@googlegroups.com.
To unsubscribe from this group, send email to flex_india+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.
Reply all
Reply to author
Forward
0 new messages