Recent

Author Topic: [SOLVED] Problem with TMainMenu shortcut keys  (Read 2310 times)

goldenfox

  • New Member
  • *
  • Posts: 47
[SOLVED] Problem with TMainMenu shortcut keys
« on: September 02, 2014, 03:44:28 am »
Hi Guys!

I have created a project with a single form. I then added a menu(TMainMenu) to the form and fire up the menu editor and added menu items and sub menus with shortcut keys. But every time I disable the parent menu, the shortcut keys of the sub-menus are still in effect.

I was expecting every time you disable the parent menu, all sub menus and shortcut keys will be disabled as well.

I have filed a report regarding this matter. http://bugs.freepascal.org/view.php?id=21720

OS: Windows 7/8.1 32bit
Laz: Trunk
FPC: Trunk

Please check attached example.

Thanks.
« Last Edit: September 03, 2014, 02:10:49 am by goldenfox »

eny

  • Hero Member
  • *****
  • Posts: 1634
Re: Problem with TMainMenu shortcut keys
« Reply #1 on: September 02, 2014, 05:51:04 pm »
I was expecting every time you disable the parent menu, all sub menus and shortcut keys will be disabled as well.
You only disable the path to the submenu item.
There is no reason to assume the underlying items get disabled.
Consider using action lists and disable the actual actions you want to prevent from happening.

What is weird though is that the actions are executed twice...
All posts based on: Win10 (Win64); Lazarus 2.0.10 'stable' (x64) unless specified otherwise...

 

TinyPortal © 2005-2018