MouseWheel Bug in CRDBGrid

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ajasja
Posts: 7
Joined: Sun 29 Oct 2006 09:46

MouseWheel Bug in CRDBGrid

Post by ajasja » Sun 29 Oct 2006 10:02

Hello!

I hope this is the right forum for this post.

Reproduce:
Well, anyway, when using TCRDBGrid if you click on the grid and use the Mouse Wheel to move to the search/filter bar, then if you try to move away (with the mouse wheel), the focus stays on the search bar.

Solution:
Add a message handler for the WMMouseWheel to the TCRGridTitleEdit.

Code: Select all

TCRGridTitleEdit = class(TCustomStaticText)
...
Protected
    Procedure WMMouseWheel(var Message : TWMMouseWheel); Message WM_MOUSEWHEEL;
...
end;

procedure TCRGridTitleEdit.WMMouseWheel(var Message: TWMMouseWheel);
begin
  if Message.WheelDelta>0 then
    GotoUpperCell
  else
    GotoLowerCell;
end;
Best regards,
Ajasja Ljubetič

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 31 Oct 2006 10:16

Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next MyDAC build.

Post Reply