I have my own DBGrid, based on TDBGrid.
In many places it is better to see the selection, so I thought to set it on Create, and the property editor saves the Options property if I set it as False later.
So constructor create it as:
constructor TMyDBGrid.Create(aOwner: TComponent);
begin
inherited Create(aOwner);
Options := Options + [dgAlwaysShowSelection];
end;
I thought that is ok, because I set it as True, the creation is making it True at first, but on the Loaded the Delphi will changed it to the good value (False).
But the experience shown that this don't working now!
I don't know why.
I put my own dbgrid on a Form1. The ASS option is on. I set it to false.
I start the application. And NOW this is ON AGAIN. When I show the value of Option on LOaded, I got True value. So the value is don't loaded as needed.
I don't know why it is happened, but I think this is based on "Default"???
My default is False, so if I set it to False, then it is don't save the values into the DFM...
So what is the possible way to I save the values without this effect?