Hi Arjun,

You need to provide those attributes to Panel's container. For example, if
your Panel is in Application container, you can set Application's
horizontalAlign=true (defualt) & verticalAlign=true..

###info.mxml###
<mx:Application width="800" height="600"
xmlns:mx="http://www.macromedia.com/2003/mxml"; initialize="appInit()"
verticalAlign="middle">

<mx:Script>
<![CDATA[

function appInit() {
}

]]>
</mx:Script>

<mx:Panel xmlns:mx="http://www.macromedia.com/2003/mxml"; 
width="300" 
height="150" 
dropShadow="true" 
horizontalAlign="center" 
panelBorderStyle="roundCorners"
verticalAlign="middle" 
title="Sign In">


</mx:Panel>

</mx:Application>



Hope that helps...

-abdul 

-----Original Message-----
From: Arjun [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 05, 2005 5:46 AM
To: [email protected]
Subject: [flexcoders] Aligining a panel



Hello

I want show a panel that is centered in my application, but not sure how to
do it, basically i have created a seprate .mxml file that displays some data
which i need to vertically and horizontaly align to center, even though i
have provided both the attributes in the panel component i am still not able
to achive the desired functionality any help/sample would be appreciated.

horizontalAlign="center" 
verticalAlign="middle" 


info.mxml

<mx:Panel xmlns:mx="http://www.macromedia.com/2003/mxml"; 
width="300" 
height="150" 
dropShadow="true" 
horizontalAlign="center" 
panelBorderStyle="roundCorners"
verticalAlign="middle" 
title="Sign In">

blah....
</mx:Panel>




Thanks
Arjun







Yahoo! Groups Links








Reply via email to