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…
Hi,
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.
https://docs.juce.com/master/classPopupMenu_1_1Options.html#ac7a93f4c8c44268cf8f4f6205186456e
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.