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

Winforms Screen Tip on RadMenuButtonItem

1 Answer 93 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 08 May 2019, 04:02 PM

I see that there is a ScreenTip associated with the button but it's not functioning for me.  Snippet of code:

 

var coolScreenTip = new RadOffice2007ScreenTipElement();
coolScreenTip.CaptionLabel.Text = wrkItem.GroupTitle;
coolScreenTip.MainTextLabel.Text = string.Format("{0}\n{1}",wrkItem.Title, wrkItem.Description);
coolScreenTip.FooterTextLabel.Text = "Test Footer";
coolScreenTip.FooterVisible = true;
 
var QuickMenuItem = new RadMenuButtonItem(strTitle)
{
//    ToolTipText = wrkItem.Description,
    KeyTip = "quick",
    Tag = wrkItem.OriginId,
    ScreenTip = coolScreenTip
};
QuickMenuItem.Click += quickMenu_Click;
radMenuItemQuick.Items.Add(QuickMenuItem);

 

Hovering over any button does not show the screen tip.  This code seems to work fine for inside of a grid, but there is a "needscreentip" event.

Any help would be appreciated!

 

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 09 May 2019, 09:55 AM
Hi Tim,

One way to solve this is to set the screen tip of the button element:
QuickMenuItem.ButtonElement.ScreenTip = coolScreenTip;

The other is to use the ScreenTipNeeded event of the RadMenu (all RadControls have this event and it will be fired for the element under the mouse):
private void RadMenu1_ScreenTipNeeded(object sender, Telerik.WinControls.ScreenTipNeededEventArgs e)
{
    if (e.Item is RadButtonElement)
    {
        var button = e.Item as RadButtonElement;
        if (button.Text == "Button")
        {
            button.ScreenTip = coolScreenTip;
        }
    }
}

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Tim
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or