I understand that new forms (and controls etc) should inherit (eg) background color from its parent.
Suppose I havea form, I set its background color in OnCreate to, say clBlack and then, later, create a new form with its background color set to clDefault, however it comes up in the usual gray.
{Form2.} frm.Parent := self;
but, shouldn't normal forms be created with Application.CreateForm?
I'm not sure making one form the parent of another has anything to do with how the second form behaves (if it does at all!).
The form's background color.
The background color of the control.
The default Color is the same as the parent window Color. If the color is clDefault then the result will need to be passed through GetDefaultColor to resolve clDefault. Convenience routines which obtains the color resolving clDefault and ParentColor are also provided as TControl.GetColorResolvingParent and TControl.GetRGBColorResolvingParent
Description of the Color property of a form (default setting being clDefault) -QuoteThe form's background color.Now, does that mean its the same as Parent's because its set the same way or because it looks to see what the parent is and sets itself accordingly ?
The background color of the control.
The default Color is the same as the parent window Color. If the color is clDefault then the result will need to be passed through GetDefaultColor to resolve clDefault. Convenience routines which obtains the color resolving clDefault and ParentColor are also provided as TControl.GetColorResolvingParent and TControl.GetRGBColorResolvingParent
Davo
(I still think dark themes are ugly ! )
Davo