1 Reply Latest reply on Sep 19, 2010 8:58 PM by Anitha Selvaraj

    Add components into Tooltip ?

    quoc_thai Level 1

      Hi all,

          

           I have a textinput, I can show tooltip when I mouse roll over. But how I can add some component into a Tooltip (example chart, image, ...) ?

       

      Thanks.

        • 1. Re: Add components into Tooltip ?
          Anitha Selvaraj Level 2

          Hi,

           

          Create a custom tooltip component (i.e., an mxml file with chart, image, etc.,). And provide the custom component to the Label's tooltip as below:

           

          <mx:Script>

              private function createCustomToolTip(event:ToolTipEvent):void {
                   var toolTip:CustomToolTip = new CustomToolTip();

                    toolTip.object = even.target.data;
                   event.toolTip = toolTip;
              }

          </mx:Script>

          <mx:Label text="sample text"  toolTip=" " data="{data}"  toolTipCreate="createCustomToolTip(event)" />

           

          Here CustomToolTip is the mxml component with components like chart, image, etc.,

           

          Regards,

          Anitha

          1 person found this helpful