Hello freaks
How I can add a named separator (menu group) to a T*Menu?
My desired sytax is - Name -.
This cannot be done easily in classes (TMainMenu, TPopupMenu) responsible for displaying individual menu items (TMenuItem). You would probably need to refer to WinAPI (Windows) or to the functions contained in the Qt or GTK libraries (Linux). Another solution is to create your own class that displays the menu.
There is one more issue. I suspect that these separators are intended to play two roles:
- real separator,
- a description for the set of commands included below this spearator.
If this is the case, I advise against this solution. This is an example of bad GUI design. A multi-level menu is provided for this purpose, i.e. a higher-level menu item groups and describes lower-level items. Users are well familiar with this solution. However, various "fancy" or "contrived" menu options will irritate users. Unless it's a program for your own needs, then it's OK.