Search the web
Sign In
New User? Sign Up
flexcoders · RIA Development with Adobe Flex
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
How to get the UITextField to remeasure   Message List  
Reply | Forward Message #145019 of 149659 |
Re: [flexcoders]How to get the UITextField to remeasure

bump

Here is an example. Create a new Application, paste this code in and then hit the button. As you can see it resizes the image but the text does not reflow. Been working on this all week.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="absolute"
        backgroundColor="#cccccc">

    <mx:Script>
        <![CDATA[
            import mx.core.UITextField;
            protected function button1_clickHandler(event:MouseEvent):void {
                var text1:UITextField = UITextField(text1.getChildAt(0));
                var loader:Loader = text1.getImageReference("loader1") as Loader;
                loader.width = 200;
            }
        ]]>
    </mx:Script>

    <mx:HDividedBox x="24" y="54" width="100%">
        <mx:Text id="text1" width="457" >
            <mx:htmlText>
                <![CDATA[some text before swf
<img src="http://www.google.com/intl/en_ALL/images/logo.gif" id="loader1"/>
some text after swf some text after swf some text after swf some text after swf some text after swf some text after swf some text after swf some text after swf some text after swf some text after swf<br/>
some text after swf<br/>
some text after swf<br/>
some text after swf<br/>
some text after swf<br/>>]]>
            </mx:htmlText>
        </mx:Text>
        <mx:Text id="text2" width="100%" >
            <mx:htmlText>
<![CDATA[another column of text]]>
            </mx:htmlText>
        </mx:Text>
    </mx:HDividedBox>
    <mx:Button x="24" y="24" label="Button" click="button1_clickHandler(event)"/>
</mx:Application>


On Thu, Jul 2, 2009 at 2:23 AM, dorkie dork from dorktown <dorkiedorkfromdorktown@...> wrote:
I have an image in a UITextField that I grab a reference to and resize. When I resize it larger or smaller than it's initial size the text around it doesn't "reflow". It stays in exactly the same space.



Fri Jul 3, 2009 9:59 pm

dorkiedorkfromdorktown@...
Send Email Send Email

Forward
Message #145019 of 149659 |
Expand Messages Author Sort by Date

I have an image in a UITextField that I grab a reference to and resize. When I resize it larger or smaller than it's initial size the text around it doesn't...
dorkie dork from dork...
dorkiedorkfromdorktow...
Send Email
Jul 2, 2009
7:24 am

bump Here is an example. Create a new Application, paste this code in and then hit the button. As you can see it resizes the image but the text does not ...
dorkie dork from dork...
dorkiedorkfromdorktow...
Send Email
Jul 3, 2009
10:00 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help