Reputation: 51
I use EhLib DBGridEh in my application and I've troubles with highliting when I start scrolling it using Scrollbar.
If I don't select cell in the grid than highliting will work correctly.
But if I select cell and start scrolling using ScrollBar than there will be highlited only one cell instead of whole raw and previous raw will be highlited too.
These you can see on picture.
Just few weeks ago I have the same situation when I scrolled grid using mouse wheel. This issue I resolved by adding handling of application messages.
procedure TMainForm.AppEventHandlerMessage(var Msg: tagMSG;
var Handled: Boolean);
var
i: SmallInt;
begin
if Msg.message = WM_MOUSEWHEEL then
begin
Msg.message := WM_KEYDOWN;
Msg.lParam := 0;
i := HiWord(Msg.wParam) ;
if i > 0 then
Msg.wParam := VK_UP
else
Msg.wParam := VK_DOWN;
Handled := False;
end;
end;
There is the full list of the properties that are enabled in my grid:
Options
OptionsEh
Upvotes: 1
Views: 2662
Reputation: 21
It is a feature of the DBGridEh. If it have multiselected area it stop rowhighlighting to avoid misunderstanding between seleced area and highlighting cells of the current row.
DmitryB
Upvotes: 2