Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Messed up menus, when there are too many items to fit the sceen and scrolling is enabled #284

Open
Daniel-Tr opened this issue Feb 19, 2021 · 0 comments

Comments

@Daniel-Tr
Copy link

  • Compiled with Delphi 10.4.1 (latest)
  • Running on Windows 10 20H2 (latest)
  • Show a themed context menu that contains more elements than possible to show on the screen at once
  • Use the mouse to click the buttons to scroll up/down
  • Issue: The menu shows fragments

With #217, the message to react on has been changed to MN_BUTTONDOWN_UP. This message seems not to be triggered at all, nor is it documented anywhere else other than with the VCL.Style.Utils.
Please add according documentation and/or consider to use the buttondown event again, which seems to fix this problem.

In regard to #217, consider to simply call the inherited/default proc, just as the VCL would do, instead of simulating keyboard events. See lines 1660 to 1671:
Vcl.Styles.Utils.Menus:

  Message2.Msg := MN_SELECTITEM;
  Message2.wParam := FKeyIndex;
  Message2.lParam := 0;
  Message2.Result := 0;
  CallDefaultProc(Message2);

  Message2.Msg := WM_KEYDOWN;
  Message2.wParam := VK_RETURN;
  CallDefaultProc(Message2);

  Message2.Msg := WM_KEYUP;
  CallDefaultProc(Message2);

Vcl.SysStyles:

  SetRedraw(False);
  Message.Result := CallDefaultProc(Message);
  SetRedraw(True);
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant