See:
Hello,
is it possible to associate a Tooltip string to a PopupMenu item (that will appear when the mouse is above the item)?
Thanks,
Frédéric.
For now, it is impossible to add a tooltip for each item of a PopupMenu without a complex implementation of CustomComponent (I give it up). However, we can achieve it by adding several lines of code. And the usage is very simple:
const auto menu = comboBox.getRootMenu();
juce::PopupMenu::Item item;
item.itemID = 1;
item.text = "text";
item.tooltipText = "tooltip text";
item.isEnabled = true;
item.isTicked = false;
menu->addItem(item);
develop ← ZL-Audio:develop
opened 05:09AM - 07 Mar 25 UTC
See:
https://forum.juce.com/t/how-to-put-a-tooltip-for-a-popupmenu-item/54529…
For now, it is impossible to add a tooltip for each item of a `PopupMenu` without a complex implementation of `CustomComponent`. Now we can add it by setting `tooltipText` of an `Item`. Example:
```cpp
const auto menu = comboBox.getRootMenu();
juce::PopupMenu::Item item;
item.itemID = 1;
item.text = "text";
item.tooltipText = "tooltip text";
item.isEnabled = true;
item.isTicked = false;
menu->addItem(item);
```