What do you mean by making the x location the right side? If this is a canvas, then just set "right equal to "0" if you just want the text box to be as far to the right as possible in the container. You could also set the x to equal parent.width - 100. Does that solve what you are asking? Karl Cynergy
________________________________ From: [email protected] on behalf of Nate Pearson Sent: Wed 2/28/2007 11:13 AM To: [email protected] Subject: [flexcoders] Re: Right Aligned Text in a UIComponent Anyone have any ideas? --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "Nate Pearson" <[EMAIL PROTECTED]> wrote: > > I'm adding a label to a UIComponent at a dynamic x location. The text > for that label is also dynamic. > > How can I make it so the x location is the right side of the label? > Here is my code: > > var endDate:Label = new Label(); > endDate.graphics.lineStyle(1,0x000000); > endDate.text = data.EDText; > endDate.styleName = "columnEnd"; > endDate.height=20; > endDate.width = 100; > endDate.x = ratio*data.ED; > endDate.y = 30; > myUIComp.addChild(endDate); > > -Nate >

