Too much tooltip

18 posts, 0 answers
  1. Henrik Brinch
    Henrik Brinch avatar
    100 posts
    Member since:
    Aug 2004

    Posted 08 Aug 2007 Link to this post

    I use the RadToolTipManager and add specifically those control I want tooltips for, but I get too much tooltips!   E.g. I have a RadCalendar control which the ToolTipManager obvisiously thinks should be tooltipified ... is this a feature or a bug?

    How do one work-around this?
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 09 Aug 2007 Link to this post

    Hello Henrik Brinch,
    I tested your scenario with a simple page but could not reproduce the problem. Could you please prepare and send us a simple running project, demonstrating this issue?

    Greetings,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Peter
    Peter avatar
    4 posts
    Member since:
    Jul 2007

    Posted 19 Aug 2007 Link to this post

    I'm experiencing the same problem.  I have a RadToolTipManager on a master page, and my pages find the tool tip manager and add the target controls in the code-behind.  The problem is more severe on pages that have no target controls, but seems somewhat random. 

    I'm loading the contents on demand.  It doesn't try to give me a tooltip on every control on the page, but it does seems to come up for most of them.  On a few controls it comes up on, it doesn't get to the AjaxUpdate call at all, instead I get

    "The given key was not present in the dictionary"

  5. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 20 Aug 2007 Link to this post

    Hi Peter,
    I am not sure what the problem might be, until I have a look at your code. Therefore, could you please prepare and send us a simple running project, that demonstrates these issues?

    Best wishes,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Henrik Brinch
    Henrik Brinch avatar
    100 posts
    Member since:
    Aug 2004

    Posted 20 Aug 2007 Link to this post

    Phew... extremely happy that I'm not the only one experiencing this problem!

    I've not yet been able to produce a simple example, because my problem is part of a more advanced dynamic creation process of the pages.

    However it seems that the AjaxUpdate call for the tooltip is called e.g. when opening a popup calender and hovering over a day.   There is no connection between the calender and the tooltipmanager (e.g. no ID's have been added) - but somehow the TooltipManager thinks it should display tooltips.

    I will try to see if I can make a simple example on the problem.
  7. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 20 Aug 2007 Link to this post

    Hi Henrik Brinch,
    It would be great if we can have a project, with which we can investigate the case. Do take your time. Once we have the project, we will do our best to provide a solution as soon as possible.

    Greetings,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. Peter
    Peter avatar
    4 posts
    Member since:
    Jul 2007

    Posted 23 Aug 2007 Link to this post

    I've found a reproducible case in my project and a workaround.

    The situation is that there is a RadToolTipManager in my master page, and the individual pages add the targets.  That works great on pages where there are targets, but the bug comes up on pages with no targets.  So I added a dummy control with a style of display:none on the master page and added that as a target all the time.  Once I did that the extra popups went away.  I don't know if this is comprehensive or an accident of my particular project - I haven't had time to create a simple test project to find out. 
  9. Henrik Brinch
    Henrik Brinch avatar
    100 posts
    Member since:
    Aug 2004

    Posted 24 Aug 2007 Link to this post

    Great Peter,

    Of course this is exactly what I'm experiencing - only on pages without tooltips.   The following code easily reproduces the problem, now try using the calendar combo ... you will notice the problem:

    using System;  
    using System.Web.UI;  
    using System.Web.UI.WebControls;  
    using Telerik.Web.UI;  
    using Telerik.WebControls;  
     
    public partial class DefaultTooltip : System.Web.UI.Page  
    {  
      private RadToolTipManager _tooltipManager;  
     
      protected void Page_Load(object sender, EventArgs e)  
      {  
        RadDatePicker picker = new RadDatePicker();  
          
        picker.ID = "cal";  
        picker.EnableViewState = true;  
        this.Panel1.Controls.Add(picker);  
     
        Label testLabel = new Label();  
        testLabel.ID = "testlabel";  
        testLabel.Text = "Here some text that needs a tooltip!";  
          
        this.Panel1.Controls.Add(testLabel);  
     
        //  When adding the control, with tooltip it works!  
        //_tooltipManager.TargetControls.Add("testlabel");  
      }  
     
      protected override void OnInit(EventArgs e)  
      {  
        ScriptManager scriptManager = new ScriptManager();  
        scriptManager.ID = "ScriptManager";  
     
        this.Panel1.Controls.Add(scriptManager);  
     
        _tooltipManager = new RadToolTipManager();  
        _tooltipManager.ID = "ToolTipManager";  
        _tooltipManager.AutoCloseDelay = 0;  
        _tooltipManager.AjaxUpdate += new ToolTipUpdateEventHandler(mngr_AjaxUpdate);  
     
        this.Panel1.Controls.Add(_tooltipManager);  
     
        base.OnInit(e);  
      }  
     
      private void mngr_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)  
      {  
        if(e.TargetControlID == "testlabel")  
        {  
          Label tooltipLabel = new Label();  
          tooltipLabel.Text = "Here my tooltip text!!!";  
     
          e.UpdatePanel.ContentTemplateContainer.Controls.Add(tooltipLabel);  
        }  
      }  
    }  
     
  10. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 27 Aug 2007 Link to this post

    Hello Henrik Brinch,
    Actually, this behavior is by design - in case the TargetControls collection of the RadToolTipManager is empty, the manager tooltipifies all elements that have a Title/ToolTip attribute. In case you do not want to use this feature, and for example, want to add an ID at a later stage, you can add a ClientID that does not match the ClientID of any control on the page to the TargetControls collection. That way, the collection will never be empty and you will get the desired behavior.

    Sincerely yours,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  11. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 06 Sep 2007 Link to this post

    Tsvetie-

    I ran in to this problem on a sample project, too. It seems like the only way to prevent his behavior is a bit of a hack (adding the dummy id). Why not simply add a property to the ToolTipManager that allows developers to disable the automatic "tooltipifying" in those cases where the developers always want explicit control over where a RadToolTip renders? Something like "EnableAutomaticTips". That would be a more elegant approach than the dummy id hack and would help a lot of developers. :)

    -Todd
  12. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 07 Sep 2007 Link to this post

    Hi Todd Anglin,
    Thank you for sharing this idea, I will forward it to our developers for consideration.

    All the best,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  13. James
    James avatar
    13 posts
    Member since:
    Feb 2007

    Posted 13 Nov 2007 Link to this post

    Yea I have been getting random crashes on my site for a while now and could never reproduce it. Finally I saw this thread..
    I would definitely say it's a bad idea to have this feature off by default!
  14. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 14 Nov 2007 Link to this post

    Hello Morgan,
    First I would like to point out that the Visible property does the job of the EnableAutomaticTips property that Todd suggested. That is why, in case you do not want the RadToolTipManager to tooltipify everything on the page, until you add some IDs to its TargetControls collection, you could set its Visible property to false initially.

    However, I do not agree with you that in case you have added a RadToolTipManager to a page and its TargetControls collection is empty, the manager should not tooltipify anything. The main idea behind the manager is to be used in scenarios where many elements would require a tooltip and as you have added it to the page, it is more natural to expect something to be tooltipified. After all, you could as well add the manager dynamically, just when you need it to start tooltipifying.

    However, we are open for other points of view on this topic. Should more people expect a manager with an empty TargetControls collection to do nothing, we will consider changing its behavior.

    Sincerely yours,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  15. Jeremy Hinkle
    Jeremy Hinkle avatar
    4 posts
    Member since:
    May 2007

    Posted 12 Feb 2008 Link to this post

    We would like to see a parameter to disable this 'feature' as well.  We dynamically add ALL of our tooltips to the manager, one dozens of pages, and in the even there is no object on the page that has a tooltip added to the manager, the whole page becomes a freaky tooltip mad house. 

    We want to disable this annoying 'feature' of tooltip manager.  Please let us!

    Unfortunately, tooltip manager has many more uses other than the situation you describe above, and when it's used in a way other than the 'auto tooltipification' way, the auto tooltipification is extremely annoying.
  16. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 12 Feb 2008 Link to this post

    Margaret-

    Thanks for the feedback. I think this strengthens the case for adding the EnableAutomaticTips property to the ToolTipManager since it highlights a problem with using the Visible property.

    If you use the Visible property, you have to manually add code to your pages that use the ToolTipManager to check the TargetControls collection size and manually adjust the visible property accordingly. If a EnableAutomaticTips property were available, you could simply set this property to "False" and the Manager would automatically set the Visible property to false if the TargetControls collection were empty.

    And so long as the AutoTips property defaults to true, it won't affect the Manager's behavior for existing implementations (since you'd have to "opt-in" to the new feature). Hopefully we'll see this enhancement soon.

    -Todd
  17. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 15 Feb 2008 Link to this post

    Hello,

    We will add a property to the RadToolTipManager AutoTooltipify (default value = true).
    When setting it to false, the tooltip manager won't tooltipify anything on the page if its TargetControls collection is empty.

    The property will be included in the Q1 Prometheus release scheduled for April.

    All the best,
    Tervel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  18. AAA
    AAA avatar
    22 posts
    Member since:
    Nov 2007

    Posted 17 Mar 2008 Link to this post

    Thank you Peter for that soln....I had a tough time figuring out what was up with the tooltip. I added a dummy div item to the tooltip manager like you said and it worked fine.

    I guess this wouldn't be a problem after the new release is out in April.
  19. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 18 Mar 2008 Link to this post

    Hi,

    The latest update available for download (e.g. Prometheus Q3 SP2) already features the property AutoTooltipify, so you can use it even now and do not need to wait till April.


    Best regards,
    Tervel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017