set_offxetX does not work in OnClientShow

2 posts, 0 answers
  1. Sub
    Sub avatar
    91 posts
    Member since:
    Nov 2007

    Posted 23 Jun 2008 Link to this post

    Hi,

    It seems that setting the offset position of the RadTooltipManager on client side does not work in OnClientShow. But it works in OnClientBeforeShow. But I cant use the OnClientBeforeShow to determine the x and y position of the tooltip.

    IS it possible to set the offset values in OnClientShow?


    sender._offsetX = -65;

    sender._offsetY = -342;

    Thanks
    Subha

  2. Kevin Babcock
    Kevin Babcock avatar
    189 posts
    Member since:
    Mar 2007

    Posted 25 Jun 2008 Link to this post

    Hello Sub,

    The problem with your question is that when the OnClientShow event is fired, the RadToolTip is already displayed. If you try to set the offset properties at this point, you will not see the change until the next time the RadToolTip is shown. You might try changing the offset properties during this event and then calling the show() method to have the RadToolTip re-show itself. However, this might cause a quick flicker.

    1 <telerik:RadCodeBlock runat="server" ID="RadCodeBlock1"
    2     <script type="text/javascript"
    3         function RadToolTip1_ClientShow(sender, eventArgs) {                 
    4             // do your processing here... 
    5             var offsetX = 50
    6             var offsetY = 50
    7             sender.set_offsetX(offsetX); 
    8             sender.set_offsetY(offsetY) 
    9             sender.show();                   
    10         } 
    11     </script> 
    12 </telerik:RadCodeBlock> 
    13          
    14 <telerik:RadToolTip ID="RadToolTip1" runat="server" 
    15     TargetControlID="Button1" 
    16     Text="Hello, RadToolTip!" 
    17     OnClientShow="RadToolTip1_ClientShow"
    18 </telerik:RadToolTip> 

    I hope this helps. Let me know if you continue to have an issue.

    Regards,
    Kevin Babcock


Back to Top