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

ToolTip on Outlook-style panelbar groups

2 Answers 78 Views
Panelbar (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
James
Top achievements
Rank 1
James asked on 01 Dec 2008, 08:17 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Martin Vasilev
Telerik team
answered on 04 Dec 2008, 07:36 PM
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.
0
James
Top achievements
Rank 1
answered on 04 Dec 2008, 09:13 PM
Thanks for the solution, Martin.  It works for me.
Tags
Panelbar (obsolete as of Q2 2010)
Asked by
James
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
James
Top achievements
Rank 1
Share this question
or