Auto Tooltips on DropDownButton

11 posts, 0 answers
  1. Steven
    Steven avatar
    28 posts
    Member since:
    May 2007

    Posted 31 May 2007 Link to this post

    I noticed that even though you set the Auto tooltips to True on the RadDropDownButton it has no effect - no tooltip gets displayed - and yes the Text value is set :)
  2. Dimitar Kapitanov
    Admin
    Dimitar Kapitanov avatar
    632 posts

    Posted 01 Jun 2007 Link to this post

    Hi Steven,
    Indeed there are no tooltips shown for button instances as in this case with the dropdown button. This is consistent with MS UI guidelines and is "by design".

    Greetings,
    Dimitar Kapitanov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Steven
    Steven avatar
    28 posts
    Member since:
    May 2007

    Posted 01 Jun 2007 Link to this post

    okay .. that woreks for me then :)

    thanks for the response.

    Steven Hodson
    WinExtra / Hodson Report
    http://www.winextra.com
    http://www.hodsonreport.com
  5. Chris Kirkman
    Chris Kirkman avatar
    11 posts
    Member since:
    Mar 2010

    Posted 18 Mar 2010 Link to this post

    Ok, that absolutely doesn't work for me.  Who ever heard of NOT allowing tooltips on drop down buttons?  It appears there is a work around, if I can somehow know what item is the "sender" in the RibbonBar_ToolTipNeeded(object sender...) event.  The problem is that even the .Name property of this sender comes back blank.  If I try to set the .Tag property to my tooltip and use that in this event, it too is null.  What gives?
  6. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 22 Mar 2010 Link to this post

    Hi Chris Kirkman,

    Thank you for writing.

    Actually, you are correct. The ToolTipTextNeeded event could be used as a work-around for the AutoToolTip limitation. Please, consider the following code as example:
    void radRibbonBar1_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e)
    {
        //set tooltip for DropDown Button Element
        if (sender is ActionButtonElement || sender is RadArrowButtonElement)
        {
            RadItem item = sender as RadItem;
            item.ToolTipText = this.radDropDownButtonElement1.Text;
        }
    }

    Do not hesitate to contact me again if you have any other questions.

    Greetings,
    Martin Vasilev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Chris Kirkman
    Chris Kirkman avatar
    11 posts
    Member since:
    Mar 2010

    Posted 22 Mar 2010 Link to this post

    I appreciate your reply; however even casting the sender as the dropdownbutton doesn't provide me access to values I need to determine what to show as the tooltip.  I originally set the tooltip in the tooltiptext property; however this property is now set to null.  The .Text property won't work for me, as my .Text and .ToolTipText are not the same, and I'm working in a localized environment were I can't use any sort of hard-coded logic to show the tooltip I want given a certain .Text value.  Also, the .Tag property is somehow null even though I've set it on the dropdownbutton previously.  The .Name property is mysteriously null as well on these dropdownbuttons that I've casted from the sender.
  8. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 24 Mar 2010 Link to this post

    Hello Chris Kirkman,

    I am afraid that without additional details I cannot understand your scenario very well. I do not see a reason why you cannot use Tag or Text properties of the RadDropDownButtonElement. Please, open a new support ticket and send me a small example project that demonstrates your approach. This will help me to investigate your case further and provide you with more accurate assistance.

    Best wishes,
    Martin Vasilev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  9. Chris Kirkman
    Chris Kirkman avatar
    11 posts
    Member since:
    Mar 2010

    Posted 02 Apr 2010 Link to this post

    I got back to this issue today.  Your method was the one I was using; however in your example you already knew which item you needed to set the tooltip for.  In my case, it could be one of MANY different items.  Therefore; when I did the following to accomplish my goal.

    1.  Form load - Create hashtable, load the tooltip for each button whose 'key' is the value of the text property for each button.
    2.  In Ribbon Bar's ToolTipTextNeeded event, use your code.
    3.  item.ToolTipText = m_hashTooltips[item.Text];

    This finally works and allows me to set any number of tooltips on any given item in the ribbon bar.
  10. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 07 Apr 2010 Link to this post

    Hi Chris Kirkman,

    Thank you for getting back to me.

    Actually, there is a way to get the RadDropDownButtonElement through the sender of the ToolTipTextNeeded event. Please, consider the following code snipped:
    void radRibbonBar1_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e)
    {
        if (sender is ActionButtonElement || sender is RadArrowButtonElement)
        {
            RadItem item = sender as RadItem;
            item.ToolTipText = ((RadDropDownButtonElement)item.Parent.Parent).Tag.ToString(); //this.radDropDownButtonElement1.Text;
        }
    }

    I hope this is helpful. Let me know if you need additional assistance.

    Best wishes,
    Martin Vasilev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  11. Jason Parrish
    Jason Parrish avatar
    87 posts
    Member since:
    Sep 2009

    Posted 16 Oct 2013 Link to this post

    Has this design been updated to show screentips on raddropdownbuttons?  In the newer office products, screentips do show up for such ribbon items.

  12. Dess
    Admin
    Dess avatar
    1601 posts

    Posted 18 Oct 2013 Link to this post

    Hello Jason,

    Thank you for contacting Telerik Support.

    I have logged this case in our Public Issue Tracking System - PITS and we will address it in a future release. You can track its progress, subscribe for status changes and add your vote/comment to it on the following link - PITS issue

    Currently, the possible workaround I can propose is using the following approach:
    public Form1()
    {
        InitializeComponent();
     
        this.radRibbonBar1.ToolTipTextNeeded += radRibbonBar1_ToolTipTextNeeded;
        this.radDropDownButtonElement1.ToolTipText = "tooltip";
    }
     
    private void radRibbonBar1_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e)
    {
        ActionButtonElement actionButton = sender as ActionButtonElement;
        RadArrowButtonElement arrowButton = sender as RadArrowButtonElement;
     
        if (actionButton != null)
        {
            e.ToolTipText = ((RadDropDownButtonElement)actionButton.Parent.Parent).ToolTipText;
        }
        else if (arrowButton!=null)
        {
            e.ToolTipText = ((RadDropDownButtonElement)arrowButton.Parent.Parent).ToolTipText;
        }
    }

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready