Recent

Author Topic: Don't use & as accelerator char in MenuItem  (Read 2541 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Don't use & as accelerator char in MenuItem
« 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.

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Don't use & as accelerator char in MenuItem
« Reply #1 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)

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: Don't use & as accelerator char in MenuItem
« Reply #2 on: June 12, 2018, 10:16:33 am »
I mean- its not nice trick. Better to have option in TMenuItem. But ok, used && now.

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Don't use & as accelerator char in MenuItem
« Reply #3 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