Tooltips for disabled elements

Tooltips for disabled elements would be useful to explain why a button is disabled.

We’re aware of this limitation and will eventually fix it. In the meantime, one workaround is to put your disabled element inside a plain VisualElement and give this parent the tooltip.

1 Like

Has there been an update to this? It doesn’t seem natively possible in 1.0 preview 14 without the visual element to cover it.

We have added a number of functionalities for disabled elements recently, to make UI Toolkit closer to IMGUI in terms of features. Tooltips are now displayed by default on disabled elements starting from the Unity 2021.2 built-in UI Toolkit. These changes are not going to be included in the package however.

3 Likes

Is this change for editor only? If, yes how would you implement tooltips on a disabled element in runtime, taking in consideration that disabled elements do not receive all events?

(related question https://discussions.unity.com/t/846846 )

Yes, this is for editor only. Unfortunately the support for controlling events on disabled elements is still internal only at this point, as we are still studying a few designs, so you wouldn’t be able to implement it yourself for runtime I’m afraid.

@uBenoitA Are there any updates to this issue as of the Unity 6 beta? I would really like to have a tooltip explaining why certain buttons are disabled in my runtime UI. Is the workaround suggested by @uDamian still the only solution?