Is it possible to assign a style-sheet to the tooltip that comes up when you assign the tooltip property is UXML?
Assuming this is for the Editor, no that is not possible. You could override the behaviour of the Tooltip event though:
- Register callback for
TooltipEvent
on an element or on the root of your UI - Call event.PreventDefault() to prevent the builtin display of tooltip
- Retrieve the event.tooltip string corresponding to the element which was under the mouse and make a custom display for it. For example add an element on top of everything and make it
style.position = Position.Absolute
andpickingMode = PickingMode.Ignore
The trickiest bit would be manage delay and mouse movement.
thanks for the answer. Too bad it’s not officially supported seems like something most people styling their editor windows would want to do. Thanks for the workaround though.