Lazarus

Programming => LCL => Topic started by: AlexTP on June 12, 2018, 08:58:51 am

Title: Don't use & as accelerator char in MenuItem
Post by: AlexTP on June 12, 2018, 08:58:51 am
How to disable & as accelerator char in MenuItem, so & is shown as usual caption char?
Only to double it as &&? Not ok.

For all widgetsets.
Title: Re: Don't use & as accelerator char in MenuItem
Post by: wp on June 12, 2018, 09:12:05 am
What do you mean with "not ok"? Not acceptable? Not working?

Doubling the "&" in the menuitem caption does show the "&" for me (Win 10)
Title: Re: Don't use & as accelerator char in MenuItem
Post by: AlexTP on June 12, 2018, 10:16:33 am
I mean- its not nice trick. Better to have option in TMenuItem. But ok, used && now.
Title: Re: Don't use & as accelerator char in MenuItem
Post by: wp on June 12, 2018, 10:40:35 am
I mean- its not nice trick. Better to have option in TMenuItem. But ok, used && now.
It is the Delphi way, and in the end it comes from Windows (DrawText, DT_HIDEPREFIX, https://msdn.microsoft.com/en-us/library/windows/desktop/dd162498(v=vs.85).aspx).

When there were an option in TMenuItem then how would you handle the case of having the underlined accelerator character together with a normal "&" in the same menu item?
TinyPortal © 2005-2018