In a TDbGrid.OnColumnMoved
event handler, I adjust some column headings colors.
I also use the grid's OnTitleClicked
event to pop-up a (sort column) menu.
Unfortunately, after the user drags a column and OnColumnMoved
is finished, the VCL calls OnTitleClicked
. This means my sort-order pop-up appears after column dragging.
Is there a way in OnColumnMoved
I can clear the mouse event queue so that OnTitleClicked
doesn't get called?
This thread has this code, but I don't have a Msg
in OnTitleClicked
.
while PeekMessage(Msg, 0, WM_MOUSEFIRST, WM_MOUSELAST,
PM_REMOVE or PM_NOYIELD) do;
(If there's no way to do this, it's not big deal. I can set a flag in OnColumnMoved
so that OnTitleClick
ignores the next call to it.)