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

AutoClose AND ManualClose

5 Answers 213 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Corey Alguire
Top achievements
Rank 1
Corey Alguire asked on 06 Jun 2008, 09:13 AM
I really like the ToolTip control and have it working pretty much the way I want it in combination with a Scheduler control. I have AutoCloseDelay and HideDelay both set in the CodeBehind, sticky set to false and (at the moment) ManualClose set to false. I was wondering, however, if it is possible to have ManualClose true and use the AutoClose/HideDelay? This way, customers can have the tooltips displayed a reasonable amount of time before disappearing, but also gives them the option of getting the tooltip out of the way if it gets in their way.

5 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 09 Jun 2008, 01:24 PM
Hi Corey,

When the RadToolTip's ManualClose property is set to true the tooltip hides when the user clicks on the close button. This behavior is by design and in this case the AutoCloseDelay and HideDelay properties' settings do not affect the control.

You can use ShowEvent="FromCode" and the rich RadToolTip' client-side API in order to build your own custom logic for showing and hiding the tooltip when you want.


Greetings,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Corey Alguire
Top achievements
Rank 1
answered on 09 Jun 2008, 02:08 PM
Svetlina,
Thanks for the response. I suspected this was the case, though I think this is too bad. I would like to add this as a suggestion for future releases for the Tooltip control. To me, it makes sense that users should be able to close the tooltip even before the auto-timed values if the content is getting in the way. It makes more sense to me from a UI standpoint that the close methods are complimentary rather than mutually exclusive.

I appreciate the ability to manipulate this via the client-side UI. It would be nice for the future though if I didn't have resort to that.

0
Svetlina Anati
Telerik team
answered on 10 Jun 2008, 11:53 AM
Hi Corey,

Thank you for your suggestion - I logged it for future consideration and updated your points.



All the best,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Sylvain
Top achievements
Rank 1
answered on 27 Jan 2009, 05:45 PM
Has this feature been implemented? I've been waiting for it. Thanks.
0
Svetlina Anati
Telerik team
answered on 30 Jan 2009, 12:35 PM
Hi Sylvain,

This functionality is not implemented but you can easily achieve the desired effect by using the setTimeout javascript function and hide the tooltip through its client-side API if it is still opened after the desired interval has passed. Your code should look like the following one:

<form id="form1" runat="server"
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
 
        <script type="text/javascript"
        function CloseToolTip() 
        { 
          var tooltip = Telerik.Web.UI.RadToolTip.getCurrent(); 
          if(tooltip) 
          { 
            tooltip.hide(); 
          } 
        } 
         
        function OnClientShow() 
        { 
           setTimeout("CloseToolTip()", 5000); 
        } 
        </script> 
 
        <telerik:RadToolTip ID="RadToolTip2" OnClientShow="OnClientShow" runat="server" Width="200" 
            Height="200" HideEvent="ManualClose" RelativeTo="Element" TargetControlID="HyperLink1"
        </telerik:RadToolTip> 
        <asp:HyperLink ID="HyperLink1" runat="server" Text="Target Control" /> 
    </form> 

For your convenience I attached a demo page.

Regards,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ToolTip
Asked by
Corey Alguire
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Corey Alguire
Top achievements
Rank 1
Sylvain
Top achievements
Rank 1
Share this question
or