TFrame crash with specific components. lazarus / 31-LCL ---------------------------------------------------------------------- dariov · 2014-07-17 17:04 Hello community: I have detected a possible bug in the frames of Lazarus (1.0, 1.2.2, 1.3trunk) when it used with custom components. The problem manifests itself when the custom component is embedded in frame and then the frame is add to a form then try to run the program, which throws an exception (The Control'' has no parent window) some time in design time and some time in run time (depending of the component)... To see the problem please install the customdrawn package that comes with lazarus, create a frame insert one CDPageControl create CDTabSheet a page or two and then try to insert the frame within a form. This is a bug of my custom components and the CDPageControl or more serious and general bug?.... IMPORTANT "Out of the frames the custom components work perfectly " Best Regards ---------------------------------------------------------------------- howardpc · 2014-07-17 22:13 It seems to be a bug not so much with frames as such, but with how frame data is stored in the .lfm when the frame contains tabsheets of a TCDPageControl. A TCDPageControl containing at least one TCDTabsheet seems not to get its tabsheet property data stored correctly  if it is contained in a frame nested in another container. (Tabsheets of a regular TPageControl inside a frame are stored OK). In some cases the lfm data refers to tabsheets by index (e.g. tabsheet[0]) rather than by component name. The "[" and "]" are of course illegal Pascal characters in identifier names. ---------------------------------------------------------------------- dariov · 2014-07-18 13:19 I do not see the problem of malformed names in lfm file, but I use indexes on the properties of my components, I will try without them.... ++++  Fragment the definition of the TElevation Type  +++++     property Color_Back: TColor    index 0 read GetColor write SetColor default clTeal;     property Color_Ray: TColor     index 1 read GetColor write SetColor default clLime;     property Color_Mark: TColor    index 2 read GetColor write SetColor default clRed;     property Color_Rect: TColor    index 3 read GetColor write SetColor default clWhite; ------   Fragment the definition of the TElevation Type  ------- +++  frame1 lfm file +++ object Frame1: TFrame1   Left = 0   Height = 240   Top = 0   Width = 320   ClientHeight = 240   ClientWidth = 320   TabOrder = 0   DesignLeft = 719   DesignTop = 131   object Elevation1: TElevation     Left = 0     Height = 240     Top = 0     Width = 320     AntennaType = at_Elevation     Count_Small = 144     Align = alClient   end end ---  frame1 lfm file --- +++ form1 lfm file +++ object Form1: TForm1   Left = 272   Height = 240   Top = 174   Width = 320   Caption = 'Form1'   ClientHeight = 240   ClientWidth = 320   LCLVersion = '1.2.2.0'   inline Frame1_1: TFrame1     Align = alClient   end end --- form1 lfm file --- Note: In the component implementation i call inherited method of all override methods and the component works fine direct on a frame... Best Regards