Thanks for the suggestion. This has now been implemented and will be included in the next release: https://feedback.objo.dev/feature/1165
The Menu Bar Designer now provides a Tag field for menus and menu items. Designer tags are stored as strings, while the runtime MenuItem.Tag property remains an Object, so code can still assign numbers, booleans, or object references.
I’ve also added:
MenuBar.FindItemByTag(tag As Object) As MenuItem
It recursively searches the complete menu hierarchy and returns the first matching menu or menu item, or Nothing when no match exists.
For example:
Var saveItem As MenuItem = Self.MenuBar.FindItemByTag("document.save")
If saveItem <> Nothing Then
saveItem.Enabled = False
End If