TMainMenu: can launch disabled menu items via shortcuts
Original Reporter info from Mantis: Bulba
-
Reporter name: Sergey Bulba
Original Reporter info from Mantis: Bulba
- Reporter name: Sergey Bulba
Description:
If you set MainMenu1.MenuItem1.Enabled:=False, however you can raise OnClick of submenu items via keyboard shortcuts.
Steps to reproduce:
Place MainMenu1 on Form1, add MenuItem1 and create its child MenuItem2. Set MenuItem2.shortcut to some key, MenuItem2.OnClick to some test procedure, and than set MenuItem1.Enabled to False. Run application and press your key to ensure that disabled MenuItem2.OnClick is raised.
Additional information:
Moreover, you can raise several menu items onclick by only one shortcut pressing. If you set one shortcut to Ctrl+F6, and second to F6, and first is calling someform.ShowModal, after closing form second is raised (see example project).
Mantis conversion info:
- Mantis ID: 25809
- OS: windows
- OS Build: xp,7 (32/64)
- Build: 43696
- Platform: win32
- Version: 1.2.0RC2