I am in need of help trying to get the ampersand character to show up in a Delphi XE6 VCL TActionMainMenuBar. I have come across similar requests on Stack Overflow but none that directly address the problem I am having.
When creating an action in the TActionManager, I need the caption of an action to read Network & Database
. I have tried using two ampersands in the caption Network && Database
to escape the accelerator which did not work. When I included two ampersands, I ended up with Network _Database
(See Screenshot1). I have also set the property of ActionBar > Items > AutoHotKeys to false and ActionMainMenuBar > PersistentHotKeys to false. Doing so did not rectify the my issue.
The one thing I did try out of pure desperation that I thought fixed it was to include four ampersands Network &&&& Database
which when ran showed up as Network & Database
(See Screenshot2). However during testing, if I were to press Alt to turn on hotkeys and navigate into the menu, the caption of the action would read Network && Database
. I tried to include a screenshot of this however since I have less than 10 reputation points Stack Overflow limits my post to two attachments.
If anyone can point me in the right direction of if I have left out some information please let me know. I've run out of ideas on how to fix this and I cannot come across anything similar when searching Google. Thanks in advance for the help.
&
? Why not simply useNetwork and Database
orNetwork / Database
? I've just had a look through the menu items in a few apps (Notepad++, Visual Studio, just for example) and have yet to see anything other thanA and B
. No&
anywhere. Perhaps you're fighting a battle that others have already decided just isn't worth it ? :) – Hartford&
in menus, even where there is no battle (or the battle perhaps remains, but for other reasons). – Hartford&
is not simply an alternative to/replacement forand
) – Hartford