Debug the IDE (open ide/lazarus.lpi and F9), when you open the form. Set a breakpoint on your setter, and see if it is called.
Maybe it is, but it is undone later?
Also:
if not (csDesigning in ComponentState) then
You should probably also check for csLoading (You may need to check this in the parent object). Unless the code should be run during loading.But even then, it should probably be deferred to OnLoaded.