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 myText:String;
                        var square:Sprite = new Sprite();
                        var squareX:Number = square.mouseX
                        var squareY:Number = square.mouseY

            s = "Field Values are : "+"\r"+"\n";
            s += "Materail Number:" +" "+event.target.data.Mat_number
+"\r"+"\n";
            s += "Item Description:" +" "+event.target.data.Item_desc
+"\r"+"\n";

            myToolTip =
ToolTipManager.createToolTip(s,squareX,squareY) as ToolTip;
            myToolTip.setStyle("backgroundColor","#000000");
            myToolTip.setStyle("color","#FFFFFF");
                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.

here is the code :

public function DisplayToolTip(event:MouseEvent):void{

                        var pt:Point = new Point(0,0);
                        this.localToGlobal(pt);

            var myText:String;
                        var square:Sprite = new Sprite();
                        var squareX:Number = square.mouseX
                        var squareY:Number = square.mouseY

            s = "Field Values are : "+"\r"+"\n";
            s += "Materail Number:" +" "+event.target.data.Mat_number
+"\r"+"\n";
            s += "Item Description:" +" "+event.target.data.Item_desc
+"\r"+"\n";

            myToolTip =
ToolTipManager.createToolTip(s,squareX,squareY) as ToolTip;
            myToolTip.setStyle("backgroundColor","#000000");
            myToolTip.setStyle("color","#FFFFFF");
                myToolTip.width = 125;
                myToolTip.height = 70;
        }

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