Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I show a tooltip on a disabled button?

Tags:

c#

.net

winforms

If you have a disabled button on a winform how can you show a tool-tip on mouse-over to inform the user why the button is disabled?

like image 988
Sam Mackrill Avatar asked Jan 29 '09 11:01

Sam Mackrill


People also ask

How do I make my tooltip always visible?

Single element To make an element display its tooltip permanently, we use its showTooltipOn property. To make tooltip always be shown, set it to "always" .

How do I enable tooltip?

How To Create a Tooltip. To create a tooltip, add the data-toggle="tooltip" attribute to an element. Note: Tooltips must be initialized with jQuery: select the specified element and call the tooltip() method.

How do I add tooltip to button tag?

Simply add a title to your button . @EduardLuca, In my case tooltip really does no work on disabled buttons because Bootstrap sets pointer-events: none for disabled state. It should work if set pointer-events: auto directly to the element. it's also that, the tooltip will aim to show bottom from where the mouse is.


1 Answers

Place the button (or any control that fits this scenario) in a container (panel, tableLayoutPanel), and associate the tooltip to the appropriate underlying panel cell. Works great in a number of scenarios, flexible. Tip: make the cell just large enough to hold the bttn, so mouseover response (tooltip display) doesn't appear to "bleed" outside the bttn borders.

like image 83
galaxis Avatar answered Sep 20 '22 13:09

galaxis