RRUZ / vcl-styles-utils

Extend and improve the Delphi VCL Styles
https://theroadtodelphi.wordpress.com/
329 stars 115 forks source link

Wrong item selected when using a scrolled popup menu #285

Open Daniel-Tr opened 3 years ago

Daniel-Tr commented 3 years ago

It seems like function TSysPopupStyleHook.GetItemClicked does not take the current offset into account. It works, when navigating the list with the keyboard only.

tweibert commented 2 years ago

I also experience this issue. So I'm bumping this. Has anyone found a solution yet?

WeberAndre commented 2 years ago

Hello, we worked around the issue with a detours hack and insert menu breaks and make long menus multicolumn... feels also better for me instead of scrolling through long popup's . If this is a solution for you I can post the code...

tweibert commented 2 years ago

Thanks, @WeberAndre - this is actually a very good idea! I changed my code so that Break := mbBreak is set on every 20th or so TMenuItem. It's even more convenient to use now.

Disclaimer: I know that popup menus shouldn't have so many items anway, but this particular one is generated dynamically from the user's configuration/database, and we have a very small number of users which happen to have an unusually large number of items in their configuration.