I am trying to restore a DBGrid's layout at runtime from column widths stored in the registry. If I resize the grid and run the write routine it stores the correct values, but when I try to read them back the grid does not want to take them.
I have singlestepped through my code and noticed that the figure read from the registry seems to be ignored, and a *random* value substituted.
I use the line
G.Columns.Items[NN].Width := ThisColWidth, where G is of type TDBGrid. I have also tried just G.Columns[NN].Width... but I get the same result.
What am I doing wrong? and how do I get it to work?