Forwarded on, sounds like a Label bug, can you try it just using a Label without being in your custom component?

 


From: [email protected] [mailto:[email protected]] On Behalf Of Michael Schmalle
Sent: Tuesday, April 04, 2006 8:19 AM
To: [email protected]
Subject: [flexcoders] Flex2 :: Custom Component :: htmlText in Label freking

 

Hi,

Adobe, I have the following;

A component that inherits from Box, I have properties title and htmlTitle.

code..

       
        /**
         *
         */
        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
        {
            super.updateDisplayList(unscaledWidth, unscaledHeight);

            if (bTitleChanged) {
                _titleLabel.text = __title;
                bTitleChanged = false;   
            }   
           
            if (bHTMLTitleChanged) {
                _titleLabel.htmlText = __htmlTitle;
                bHTMLTitleChanged = false; 
            }   
        }

When you set the title property, the Label child component sizes properly. When you set the htmlTitle property, it gets truncated but the component sizes properly (I can see the border). It is also not switching to html, I can see the <b> tags.

Here is my get/set...

       
        /**
         * Sets the HTML title of the titlebar.
         * @param value a string used for the HTML title text.
         */
         public function set htmlTitle(value:String):void
         {
             if (__htmlTitle != value) {
                 __htmlTitle = value;
                 bHTMLTitleChanged = true;
                 invalidateDisplayList();
                 dispatchEvent(new Event("htmlTitleChanged"));
             }   
         }
         public function get htmlTitle():String
         {
             return __htmlTitle;   
         }


Seems like a bug to me, this should work.

Any thoughts?

Peace, Mike




--
What goes up, does come down.



--
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