In the event handler, TDbGrid.OnColumnMovedI adjust the colors of the column headers.
I also use the grid event OnTitleClickedfor the popup menu (sort column).
Unfortunately, after the user drags the column and is OnColumnMovedfinished, VCL calls OnTitleClicked. This means that the sort-order popup appears after you drag the column.
Is there a way in OnColumnMovedI can clear the mouse event queue so that it is OnTitleClickednot called?
This thread has this code, but I don't have one Msgin OnTitleClicked.
while PeekMessage(Msg, 0, WM_MOUSEFIRST, WM_MOUSELAST,
PM_REMOVE or PM_NOYIELD) do;
(If there is no way to do this, this does not really matter. I can set the flag OnColumnMovedto OnTitleClickignore the next call.)
source
share