Closed
Description
Setting Color property of self works ok. Setting Color property of components placed on self does not work. True for all components that have a Color property like Panel, GroupBox aso. Does not work at runtime either. Other properties can be assigned without problem.
def __init__(self, Owner):
### object Form
self.SetBounds(310, 137, 730, 256) #self
self.Caption = 'Form1'
self.Color = clSkyBlue ###colors all components on form, even if ParentColor is set False for each component
self.Font.Color = clWindowText
self.Font.Height = -11
self.Font.Name = 'MS Sans Serif'
self.Font.Style = []
self.OldCreateOrder = False
self.PixelsPerInch = 96
self.TextHeight = 13
### object GroupBox1, parent self
self.GroupBox1 = GroupBox(self)
self.GroupBox1.Parent = self
self.GroupBox1.SetBounds(20, 20, 266, 136) #GroupBox1
self.GroupBox1.Caption = 'GroupBox1'
self.GroupBox1.Color = clRed ###does not work
self.GroupBox1.SetProps(Parent=self, Color=clRed) ###nor does this help
self.GroupBox1.Font.Color = clWindowText