Hi,
    I have even tried using the the below code's but still couldn't
get the position of the tooltip changing dynamically.

Code 1:
                    myTip = ToolTipManager.createToolTip(s,
                    event.currentTarget.x + event.currentTarget.width
+ 10,
                    event.currentTarget.y)
                    as ToolTip;

Code 2:                                 var pt:Point = new
Point(0,height);
                                        pt = localToGlobal(pt);
                                        pt = root.globalToLocal(pt);
                                        myTip =
ToolTipManager.createToolTip(s,pt.x,pt.y) as ToolTip;

Regards,
Malavika.

On Sep 3, 11:45 pm, malavika <[EMAIL PROTECTED]> wrote:
> Hi Venkat,
>      Thanks for the quick reply. This is the function that has been
> called on the rollover event. when the mouse is been placed over the
> column(the data in the tooltip will be changed dynamically when it is
> placed over each row) this function is been called. The ToolTip is
> appearing all through the row of that column.  Instead of appearing on
> the data.
>
> public function DisplayToolTip(event:MouseEvent):void{
>             var text:String;
>                         var square:Sprite = new Sprite();
>                         var positionX:Number = square.mouseX
>                         var positionY:Number = square.mouseY
>
>             text = "Field Values are : "+"\r"+"\n";
>             text += "Materail Number:" +"
> "+event.target.data.Mat_number
> +"\r"+"\n";
>             text += "Item Description:" +"
> "+event.target.data.Item_desc
> +"\r"+"\n";
>
>             myToolTip =
> ToolTipManager.createToolTip(text,positionX,positionY) as ToolTip;
>             myToolTip.setStyle("color","#000000");
>                 myToolTip.width = 125;
>                 myToolTip.height = 70;
>         }
>
> I tried of putting your code inside this function. But could not find
> out the change. I suppose i might have made the mistake.
>
> Regards,
> Malavika.
>
> On Sep 3, 12:14 am, "Venkat Viswanathan" <[EMAIL PROTECTED]>
> wrote:
>
> > Hi Malavika,
>
> > Inside the itemRenderer, put this code:
>
> > var pt:Point = new Point(0,0);
> > this.localToGlobal(pt);
>
> > This will help you get the global x,y co-ordinates for individual
> > itemRenderers.
>
> > Let me know if this still doeskin solve your problem.
>
> > Regards,
> > Venkatwww.venkatv.com
>
> > On Tue, Sep 2, 2008 at 10:51 PM, malavika <[EMAIL PROTECTED]>wrote:
>
> > > Hi Everyone,
> > >          I have a serious problem of controlling the X and Y position
> > > for a ToolTip. I have a datagrid for populating the data over it. When
> > > the mouse is rollovered on the one of the column I'm poppingup a
> > > tooltip. As the mouse is moved over the text in that column the
> > > tooltip position is changing according to that. I could not really
> > > understand how to make the position stable. At the same time even i
> > > could not hardcode the x and y position of the tooltip.
>
> > > My Code :
> > >                                        var square:Sprite = new
> > > Sprite();
> > >                                        var positionX:Number = 
> > > square.mouseX
> > >                                        var positionX:Number = 
> > > square.mouseY
> > >                                       myToolTip =
> > > ToolTipManager.createToolTip(text,positionX,positionY) as ToolTip;
>
> > > Thanks,
> > > Malavika.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to