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.
This has happened because a recent Windows 10 update changed the default language and region settings to US English. To fix it, click the Windows button in the far left hand corner of your taskbar (or tap the Windows key on your keyboard) and start typing “Region & language settings”.
Ampersand is part of number 7 key on most of the general English keyboard layout. You can use “Shift + 7” keys to type & symbol.
You can fix it on your form's onshow event
action3.caption := 'Network &&Database';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With