Hi Steve, Its not working. While I am typing the text shifts as left aligned. This being a right to left chat application, I cant let it happen.
Thanks, Rohit On Thu, May 21, 2009 at 6:31 PM, valdhor <valdhorli...@embarqmail.com>wrote: > > > Something like this should work... > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> > <mx:Style> > FormItemLabel > { > textAlign: left; > } > </mx:Style> > <mx:Script> > <![CDATA[ > private function > setLeftAlignmentWhileTyping(event:KeyboardEvent):void > { > if(ti3.getStyle("textAlign") == "right") > { > ti3.setStyle("textAlign", "left"); > } > } > ]]> > </mx:Script> > <mx:Form> > <mx:FormItem label="textAlign = left:"> > <mx:TextInput id="ti1" text="left" textAlign="left" /> > </mx:FormItem> > <mx:FormItem label="textAlign = center:"> > <mx:TextInput id="ti2" text="center" textAlign="center" /> > </mx:FormItem> > <mx:FormItem label="textAlign = right:"> > <mx:TextInput id="ti3" text="right" textAlign="right" > keyUp="setLeftAlignmentWhileTyping(event)" > focusOut="ti3.setStyle('textAlign', 'right')" /> > </mx:FormItem> > </mx:Form> > </mx:Application> > > All it does is set the textAlign to left if someone is typing into the > field and then resets textAlign to right when they are done. > > > > HTH > > > > Steve > > --- In flexcoders@yahoogroups.com, Rohit Sharma <rohit.sharma1...@...> > wrote: > > > > Hi, > > > > In a text input, if the text align property is set to right, the text > > doesn't get scrolled automatically. > > The scrolling only happens if you select the text using mouse and then > drag > > the mouse. > > It does not scroll even with arrow keys. > > This bug is also reported for flex SDK. > > http://bugs.adobe.com/jira/browse/SDK-17418 > > http://bugs.adobe.com/jira/browse/FP-2079 > > The bug also mentions a workaround. But I am not able to use that > > workaround. > > Can anyone help me with the bug or with the workaround? > > > > Thanks, > > Rohit > > > >