Keyboard navigation error in AdvMainMenu

Hi Folks,

there's a small bug in the AdvMainMenu Keyboard navigation. We have a TAdvMainMenu tied to a TAdvMainMenuToolbar on a TAdvDockPanel. VCL UI Pack

Let's say the Menu has the Item '&File' with a few subitems.

  • If you press Alt+F, no menu entry is selected (not correct).
  • If you press Alt+F and then the down arrow, the second menu entry will be selected (not correct).
  • If you press Alt+F and then the up arrow, the last menu entry is selected (correct).

Either Alt+F should immediately select and highlight the first menu entry or Alt+F + down arrow should do so.



Could you create a small test example?
I've tried this on my system with an TAdvMainMenu set as the Menu property of an TAdvToolBar, that is in a TAdvDockPanel.
This has a '&File' item with three subitems, but when I press Alt + F the first item is selected.

Good Morning Gjalt,

Indeed, it doesn’t happen out of the box. You have to activate a VCL Style. Here’s what I see when I press Alt+F with the attached Demo. Compiled with Delphi 0.4.2





Without VCL Styles, everything looks fine.



image002.jpg (161 KB)

We investigated this and it appears to be a shortcoming in the underling standard VCL TPopupMenu that is not correctly triggering the custom draw of the selected item when the menu gets first focus.
We will need to report this to Embarcadero.

Thank you, so this will probably take some time to get fixed :)
I remember that RRUZ's vcl-styles-utils (GitHub - RRUZ/vcl-styles-utils: Extend and improve the Delphi VCL Styles) fixed some issues and introduced others. We used his menu fix for a while, but when it was included, the left-right keyboard navigation between menus didn't work anymore.