Tooltip for a popup menu item

I have a custom component in a popup menu. Is there any way to have a tooltip for this component show up infront of the menu? At the moment they appear behind the menu. I can’t workout how to move it’s z-order.

Your TooltipWindow instance is a Component. Did you try calling Component::toFront() on it? There is also Component::setAlwaysOnTop(). I don’t know if it works, just thinking…


if you’re opening the PopupMenu as an independent top level window (which is the default), then this may be tricky… What you can try: If your layout and popup size allows it, don’t create the PopupMenu as a window, instead attach it to the existing window.
Do this by using PopupMenuOptions.withParentComponent, using any component that covers your entire window as parent.

While the solution works, it has limitations. Specifically, it prevents the popup menu from extending outside the boundaries of the plugin window and also removes the drop shadow. Given these constraints, it might be more practical to simply toggle the visibility of a component using conventional methods. That said, I appreciate the suggestion. If anyone knows how to maintain the menu as a floating window while still allowing tooltips to appear in front, I would be very interested to hear your insights.