Ampersands (& s) and various versions of Windows

So, I released a quick fix for our software, which had “Data _Rules” on the ribbon tab, as it was some months ago for some people. I found that in Windows Vista and Windows 7 I needed to write a title like “Data && Rules” instead of “Data and Rules”, since versions above XP would interpret the first ampersand as a keyboard shortcut.

However, I just received an email from one of our consultants saying that someone he works with using Windows 7 can see the “Data and Rules” tab.

What is the right way to deal with such things? It is clear that I am checking the OS version and deciding that it is not complete enough. Have you had to deal with such things before?

I am coding in Delphi using Delphi 7, but it could be a WIN32 thing.

Thanks!

+4
source share
1 answer

The use and interpretation of an access character and as an access character is a fairly standard practice requiring the explicit flag to disable or double them in order to insert the & literal. Usually they require explicit support from the control.

If one control handles it differently based on the OS version, you really need to raise an error with the authors.

+5
source

Source: https://habr.com/ru/post/1386086/


All Articles