tooltip at x y position

3 posts, 1 answers
  1. Dheeraj Ramaswamy
    Dheeraj Ramaswamy avatar
    15 posts
    Member since:
    Jun 2008

    Posted 06 Jul 2009 Link to this post

    Hi,

     I have been trying to search this on the forum but couldnt find any. I have a simple requirement of dynamically showing (from client side) at the x y position of the mouse. The difference between some example shown at the site is that it always has targetcontrolid but the element i clicked does not have any id.... Its a html anchor element and an example is shown below

    <a href="javascript:showComments(1);">Comment1</a>

    So far i have been able to determine the x y position of the mouse but wanted to see if there is any tooltip.showAt function which will position the tooltip at the specified x,y co-ordinates?

    Pretty sure this has been answered somewhere but couldnt find it

     
  2. Answer
    Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 09 Jul 2009 Link to this post

    Hi Dheeraj,

    I suggest to hook up the OnClientShow event, to obtain a reference to teh tooltip there and to change its top and left settings as shown below:

         <script type="text/javascript">  
              
            function OnClientShow(sender, args)  
            {  
               var popupelement = sender.get_popupElement();  
               popupelement.style.top = "500px";  
               popupelement.style.left = "500px";             
            }  
              
            </script> 




    Best wishes,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. TIGER
    TIGER avatar
    24 posts
    Member since:
    Mar 2008

    Posted 08 Sep 2011 Link to this post

    I tried this and it did not work as expected. Seemed the tooltip had already been shown at previouse position and changing style.top would not affect it. The onclientbeforeshow event seemed early to accept any position adjustment. Setting a html element for position anchor might be a solution.
Back to Top