|
procedure TForm_dbgrid.ApplicationEvents1Message (var Msg: tagMSG;
var Handled: Boolean);
begin
if (DBGrid1.Focused) And (Msg.message = WM_MOUSEWHEEL) then
begin
if Msg.wParam> 0 then
SendMessage (DBGrid1.Handle, WM_KEYDOWN, VK_UP, 0)
else
SendMessage (DBGrid1.Handle, WM_KEYDOWN, VK_DOWN, 0);
Handled: = True;
end;
end;
===== The above code implements a mouse wheel that can be used in DBGRID, but after selecting multiple records, the selected records are all lost (the focus will not be lost with the drop-down bar), how to solve it? |
|