How do I show tooltips on RadContextMenuItems that are disabled?

1 Answer 109 Views
ContextMenu
Phil Lindquist
Top achievements
Rank 1
Phil Lindquist asked on 22 Aug 2023, 02:15 PM

Hello.  Our application is using Telerik WinControls from Q1 2022.

We have a number of context menus where we wish to conditionally disable menu items and show a tooltip that explains why the menu item is disabled.  The problem is that when the menu item is disabled then no tooltip is displayed!

How do we get tooltips to display even when the menu item is disabled?

In the following example we would not see the tooltip when menuItem.Enabled = false;  Can we get a fix for this?  Our work-around is causing other problems.

RadContextMenu contextMenu = new RadContextMenu();

RadMenuItem menuItem = new RadMenuItem("View in Browser");

contextMenu.Items.Add(menuItem);

if (supportsBrowser())

{

     menuItem.Tooltip = "Open your browser";

}

else

{

     menuItem.Enabled = false;

     menuItem.Tooltip = "This device does not support browser access.";

}

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 23 Aug 2023, 12:57 PM

Hello, Phil,

It is expected behavior when a RadControl/RadElement is disabled, it doesn't handle user's mouse input. Hence, the tooltips wouldn't be shown respectively. I believe that the following forum post would be quite useful on this topic:

https://www.telerik.com/forums/tooltip-not-showing-in-textbox-when-it-is-enabled-as-false#1617271 

It refers to several approaches how to achieve the requirement you have. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Phil Lindquist
Top achievements
Rank 1
commented on 23 Aug 2023, 01:21 PM

Thank you Dess.  I understand that this is expected behavior however I think it might be worth considering an alteration.

When I put tooltip text on a disabled Microsoft Forms button then nothing is displayed however when I put tooltip text on a disabled Microsoft Forms context menu item then the tooltip text is still displayed as below.

I will look into the proposed solutions however it would be nice if a future version of the Telerik controls offered the option to enable the tooltip regardless of the enabled/disabled state of the control under it.  A tooltip is a good way to tell the user why the menu item is disabled.

Dess | Tech Support Engineer, Principal
Telerik team
commented on 28 Aug 2023, 08:45 AM

Hi, Phil,

The provided feedback is greatly appreciated. Indeed,

We will definitely consider it in the future improvement of the suite and RadMenu in particular. That is why 

I have logged it in our feedback portal by creating a public thread on your behalf. You can track its progress, subscribe for status changes, and add your comments on the following link - feedback item.

I have also updated your Telerik points.


Tags
ContextMenu
Asked by
Phil Lindquist
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or