Unexpected behavior of TDBGrid.OnColumnMoved event
Original Reporter info from Mantis: wp @wpam
-
Reporter name:
Original Reporter info from Mantis: wp @wpam
- Reporter name:
Description:
The name of the OnColumnMoved event of the DBGrid implies that the column already has been moved when the event fires. But the attached demo show that this is not true: the event fires in some intermediate state when the Columns collection is still in its old order. Or the event is not named correctly: OnColumnMoving or OnColumnMove (without the traling "d") would be more appropriate to describe the current behavior of the grid (but then there should also be a TNotifyEvent OnColumnMoved after completion of the move operation).
Steps to reproduce:
Run the attached demo:
- The three columns of the DBGrid are in the order "Article" - "Price" - "Count" initially.
- Now drag the last column "Count" to the left such that the red insertion line appears before the column "Article".
- When the mouse button is released the order of the columns at the moment of the OnColumnMoved event is displayed in the memo at the right; it is still the old order and does not match the order displayed in the grid.
Additional information:
Although I specified product version 1.9 this is actually a very old problem because it occurs also with Laz 1.0.
I checked on Windows (10), Linux gtk2 and qt.
Mantis conversion info:
- Mantis ID: 32210
- Version: 1.9 (SVN)