2 Replies Latest reply on Sep 24, 2010 2:48 AM by simplesid

    positioning a custom tooltip

    simplesid

      Hi,

      I have used a panel which implements mx.core.IToolTip as a  custom tooltip. I have customized the borders, colors and everything,  but i want to position the tooltip just above my cursor (and not below  it). How should i do this? i am not able to position it.

      The  tooltip is to be displayed from inside an item renderer for a  datagrid. Following is the code snippet. Any help is sincerely appreciated.

       

       

      Thanks!

      Sid

        • 1. Re: positioning a custom tooltip
          Anitha Selvaraj Level 2

          Attach your code snippet

          • 2. Re: positioning a custom tooltip
            simplesid Level 1

            It is not getting pasted properly. I tried it as a java code snippet.

            i had pasted in my earlier post.. but it is not displaying.. anyways..

            ------------------------------------------------------------------------------------------ -----------------------------------------

             

            public function createCustomTip(body:String, event:ToolTipEvent):void {

                       var ptt:PanelToolTip = new PanelToolTip();

                       ptt.bodyText = body;

                       event.toolTip = ptt;

                    }

             

            ------------------------------------------------------------------------------------------ -----------------------------------------

             

            <mx:Component>

            <mx:HBox verticalAlign="middle" backgroundColor="#FFFFCC" verticalScrollPolicy="off" horizontalScrollPolicy="off">

               <mx:Text text="{data.valuableData}" width="100%" height="100%" toolTip=" "

               toolTipCreate="parentDocument.createCustomTip(data.toolTip, event)" />

            </mx:HBox>

            </mx:Component>

             

            ------------------------------------------------------------------------------------------ -----------------------------------------

             

            Thanks!

            Sid