1 Reply Latest reply on Dec 3, 2009 10:48 PM by Gregory Lafrance

    How to add a tooltip to a Panel titleIcon?


      I am currently trying to figure out the 'right' way to add a tooltip to a titleIcon within a Panel.  Right now the only way I have been able to do this is by accessing data members in the mx_internal namespace, which doesn't guarantee compatability with past or new players.  Here is the code snippet that I have thus far, but would be interested in feedback on how to do this through public or protected APIs -- or 'the right way'.


      var titleBar:UIComponent = mainPanel.mx_internal::getTitleBar();
      var titleIcon:Bitmap = mainPanel.mx_internal::titleIconObject;


      var icon:Image = new Image();            

      icon.source = new Bitmap(titleIcon.bitmapData);              

      icon.toolTip = "new tool tip";              

      icon.width = titleIcon.width;              

      icon.height = titleIcon.height;              

      icon.x = titleIcon.x;              

      icon.y = titleIcon.y;              




      Thanks in advance!