ToolTip on Outlook-style panelbar groups

3 posts, 1 answers
  1. James
    James avatar
    2 posts
    Member since:
    Nov 2008

    Posted 01 Dec 2008 Link to this post

    I've set tooltips for each group element, however, when the groups are collapsed into icons along the bottom in the Outlook style there is no tooltip on those icons.  I'd like the little icons on the bottom to show the tooltip for that group element.  Is this possible?
  2. Answer
    Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 04 Dec 2008 Link to this post

    Hi James,

    Thank you for writing.

    I confirm that there is not an easy way to set the tool tip text when the group elements transforms in toggle buttons in RadPanelBar. We will add this functionality in some of the next release.

    Currently, you could work-around this by using ToolTiptextNeeded event of RadPanelBar. Please, review the code-block below:
     
    private void radPanelBar1_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e)  
    {  
        if (sender is RadToggleButtonElement)  
        {  
            RadToggleButtonElement item = ((RadToggleButtonElement)sender);  
     
            int index =   
                ((RadPanelBarOverFlow)this.radPanelBar1.PanelBarElement.  
                Children[0].Children[1]).Items.IndexOf((RadItem)item);  
     
            RadPanelBarGroupElement element =   
                ((RadPanelBarGroupElement)this.radPanelBar1.  
                Items[this.radPanelBar1.Items.Count - index - 1]);  
     
            if (element.ToolTipText != String.Empty && element.ToolTipText != null)  
            {  
                e.ToolTipText = element.ToolTipText;  
            }  
            else if (element.Caption != String.Empty && element.Caption != null)  
            {  
                e.ToolTipText = element.Caption;  
            }  
        }  

    I hope this helps. I have updated your Telerik points for bringing our attention on this.

    If you have other questions, do not hesitate to contact me again.

    Greetings,
    Martin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. James
    James avatar
    2 posts
    Member since:
    Nov 2008

    Posted 04 Dec 2008 Link to this post

    Thanks for the solution, Martin.  It works for me.
Back to Top