[SOLVED] Sub Component properties not saved in .lfm lazarus / 31-LCL ---------------------------------------------------------------------- Fahmy Rofiq · 2015-01-03 01:34 Hello, I created a new Component: Code: [Select]... type   TTaFKDBGrid = class(TPanel) ...   private     FKDBGrid: TKDBGrid; ...   public     constructor Create(TheOwner: TComponent); override; ...   published     KDBGrid: TKDBGrid read FKDBGrid; ... constructor TTaFKDBGrid.Create(TheOwner: TComponent); begin   inherited Create(TheOwner);   FKDBGrid := TKDBGrid.Create(Self);   with KDBGrid do   begin     Name := 'DBGrid';     BorderStyle := bsNone;     Parent := Self;     Align := alClient;   end; end; When I change KDBGrid properties from object inspector, changes are not saved on .lfm file. Is there must be any special treatment to able save KDBGrid properties to .lfm? Thanks,,, ---------------------------------------------------------------------- engkin · 2015-01-03 03:09 Make it a sub component: Code: [Select]...   with KDBGrid do   begin     Name := 'DBGrid';     SetSubComponent(True);  //<--------- ... Check TWriter.WriteProperty in rtl\objpas\classes\writer.inc for details. ---------------------------------------------------------------------- Fahmy Rofiq · 2015-01-03 04:06 Great, thank you engkin.