How can I attach the edit boxes to the corresponding grid columns, so it will change width when the user change the column width and move around when the user change the order of DBGraid columns.
Asked
Active
Viewed 301 times
1 Answers
1
If you want to know that the column widths have changed then you can override ColWidthsChanged
. I'm not aware of a corresponding event.
For detecting columns having moved you can either override ColumnMoved
or attach a handler to the OnColumnMoved
event.

David Heffernan
- 601,492
- 42
- 1,072
- 1,490
-
the TColumn has now Left properties, do I have to calculate the new edit1.Left in ColumnMoved ? – Najem Mar 16 '11 at 16:52
-
You'll need to calculate it from the width properties. You'll need to allow for any borders too. – David Heffernan Mar 16 '11 at 17:31