A quick look at the docs (and a test) indicates that textAlign will have no effect here, rather, left align is the default of the VBox.  Remember, alignment goes on the container, and affects the children.

 

“textAlign : Alignment of text within a container. Recognized values are left, right, or center. The default value is left.
For the Button, Link, and AccordionHeader components, the default value is
center. For these components, this property is only recognized when labelPlacement property is left or right. If labelPlacement is top or bottom, the text and any icon are centered.

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of Tracy Spratt
Sent: Monday, September 26, 2005 6:38 PM
To: [email protected]
Subject: RE: [flexcoders] Problems with alligning

 

The problem is that the second vbox is really only as wide as its child label, so you can’t see any alignment.

 

Add width="100%" to the VBox and see what happens.

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of [EMAIL PROTECTED]
Sent: Monday, September 26, 2005 1:47 PM
To: [email protected]
Subject: [flexcoders] Problems with alligning

 

Sorry for mentioning this again but I am still having problems alligning the code I want to the left. I will however post some code so that maybe I can clear up what it is that I am trying to do. I want the label that says "Allign this text to the left" to appear on the left side of the page and I was thinking that maybe the textAllign attribute could do that but I guess not. Can someone give me tips on how i might want to go about alligning it?

 

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"      marginTop="8"    verticalGap="0">

 

 

 

        <mx:HBox >
           
        <mx:Label text="Allign label below" fontSize="20"/>

 


</mx:HBox>

 

<mx:VBox>
        <mx:Label text="Allign this thext to the left"  textAlign="left" fontSize= "20"/>
</mx:VBox>       
 
</mx:Application>





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to