Superscript, subscript etc. in PopupMenus
ggermer
If you want to select an entry via a PopupMenu, the "Igor text" is displayed in the PopupMenu without interpretation. The interpreted form is only displayed when the entry is selected and the PopupMenu is closed.
I don't know if this is a wish or a bug report: it would be nice if the text was also displayed readable and interpreted in the open PopupMenu.
Example:
During selection:
Ex\Sam\M\Bpl\Me
Selected:
Example
I have no idea how this code works in Igor, but I could imagine that the menu itself is rendered with the Menu code but the static popup stuff is rendered as 'title'. Note that Igor menus are also not interpreting escape characters. Would be great if they did (enabling color, bold text etc.).
August 20, 2024 at 09:46 am - Permalink
Chozo is right; showing styled text in menus just isn't supported by Qt.
August 20, 2024 at 11:47 am - Permalink
Sad news! Would it at least be possible to set an alternative text for menus?
August 20, 2024 at 11:03 pm - Permalink
What is your application? Maybe you can spin up your own 'fake' popup in form of a panel. If you need to present a list with specialized text for selection, maybe a ListBox is the better choice.
August 20, 2024 at 11:06 pm - Permalink
It's not very dramatic. I now use upper and lower case letters instead. But it would probably have looked better with subscript.
Thank you all for explaining why it is the way it is.
August 21, 2024 at 11:33 pm - Permalink