Hi All,

I have to provide the support for the style leading (which is used for line 
spacing) for UItextField component. Problem is that the line spacing doesn't 
get applied to the last line of a multiline text.
Interestingly, if if it is a single line text then it works fine.

Run the following example to get the idea about the problem I'm facing.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
creationComplete="onC()">
<mx:Script>
        <![CDATA[
                import mx.core.UITextField;
                
                private var u1:UITextField;
                private var u2:UITextField;
        
                override protected function createChildren():void
                {
                        u1 = new UITextField()
                        u2 = new UITextField()
                        super.createChildren()
                }
                private function onC():void
                {
                        u1.border = true;
                        u1.multiline = true;
                        u1.wordWrap = true;
                        u1.width = 50;
                        u1.text = "Mahesh Mahesh Mahesh Mahesh Mahesh Mahesh"

                        u2.border = true;
                        u2.multiline = true;
                        u2.wordWrap = true;
                        u2.width = 50;
                        u2.text = "Mahesh"
                        h1.addChild(u1);
                        h1.addChild(u2);
                        
                        setStyle("leading",20)
                }
        ]]>
</mx:Script>
<mx:HBox verticalAlign="bottom" id="h1"/>
</mx:Application>


I need the line spacing to get applied for all the line of the text including 
the last one. Does anyone have any idea about the workaround?

TIA

-Mahesh Kokadwar


Reply via email to