Close on right click

2 posts, 0 answers
  1. Macaroni
    Macaroni avatar
    19 posts
    Member since:
    Aug 2006

    Posted 23 Jul 2007 Link to this post

    Hello,

    I m using the tooltip to display a large picture of a thumbnail.

    But I would like to avoid people to right click on it to download it.

    Is there a way to close the tool tip on click? or at least right click?

    Thanks a lot.
  2. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 24 Jul 2007 Link to this post

    Hello Macaroni,

    You can easily hide the tooltip by attaching an onclick or oncontextmenu event handler to the image.
    In the event handler get a reference to the tooltip and close it, e.g. by using code similar to this:

    var tooltip = $find("RadToolTip2");
    tooltip.hide();

    The following online example demonstrates a number of clientside tooltip methods and will help you in your own scenario - http://www.telerik.com/DEMOS/ASPNET/Prometheus/ToolTip/Examples/ClientSideAPI/DefaultCS.aspx 
    Please note in the example how the "Language" list  and its associated tooltip work.

    Best wishes,
    Tervel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top