This code works fine with the form created in the IDE in the VCL Forms application:
Self.ParentBackground := True;
But why? None of the descendants ( TForm , TCustomForm , TScrollingWinControl ) publish the protected ParentBackground TWinControl property. The type declaration for the form (fi 'TForm1') at the top of the block is also not. Indeed, as expected, this
TForm(Self).ParentBackground := True;
not compiled ("Cannot access protected character TWinControl.ParentBackground"). Same thing with any form created at runtime.
Note Question: not about how I can set the property (BTW, there are others, for example "Bevel [xxx]") I would like to know how this works.
source share