This is a migrated thread and some comments may be shown as answers.

set_offxetX does not work in OnClientShow

1 Answer 60 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Sub
Top achievements
Rank 1
Sub asked on 23 Jun 2008, 09:16 PM
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

1 Answer, 1 is accepted

Sort by
0
Kevin Babcock
Top achievements
Rank 1
answered on 25 Jun 2008, 07:29 PM
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.

<telerik:RadCodeBlock runat="server" ID="RadCodeBlock1"
    <script type="text/javascript"
        function RadToolTip1_ClientShow(sender, eventArgs) {                 
            // do your processing here... 
            var offsetX = 50
            var offsetY = 50
            sender.set_offsetX(offsetX); 
            sender.set_offsetY(offsetY) 
            sender.show();                   
        } 
    </script> 
</telerik:RadCodeBlock> 
         
<telerik:RadToolTip ID="RadToolTip1" runat="server" 
    TargetControlID="Button1" 
    Text="Hello, RadToolTip!" 
    OnClientShow="RadToolTip1_ClientShow"
</telerik:RadToolTip> 

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

Regards,
Kevin Babcock


Tags
ToolTip
Asked by
Sub
Top achievements
Rank 1
Answers by
Kevin Babcock
Top achievements
Rank 1
Share this question
or