Initializing TFrame private variables. Where? lazarus / 31-LCL ---------------------------------------------------------------------- Leledumbo · 2010-04-28 22:38 TFrame doesn't have OnCreate or something similar. So how can I initialize its private variables? ---------------------------------------------------------------------- Imants · 2010-04-29 03:11 Just override existing constructor like this:   TFrame1 = class(TFrame)   private     MyVar: Integer;   public     constructor Create(TheOwner: TComponent); override;   end; ..... constructor TFrame1.Create(TheOwner: TComponent); begin   inherited Create(TheOwner);   MyVar := 0; end; ---------------------------------------------------------------------- Leledumbo · 2010-04-29 05:47 Hahaha... I guess I was too sleepy to think about it. Thanks. ---------------------------------------------------------------------- wOvAN · 2010-04-29 09:30 Code: [Select]  Frame1 = class(TFrame)   public     { public declarations }     procedure AfterConstruction; override;     procedure BeforeDestruction; override;   end; ---------------------------------------------------------------------- mas steindorff · 2010-04-30 00:15 since were on frames.... I have a project that uses a TFrame.  When I Update the Frame's looks at design time, the copies on the form do not change. When I run the program, all looks and works well.  Is there an easy way to update the frames I've placed other than to delete them and add them back in? ---------------------------------------------------------------------- Imants · 2010-04-30 03:38 I think the esyest vhay is to close and then open again those files where your frame copy is. ---------------------------------------------------------------------- mas steindorff · 2010-04-30 20:19 Wow, it works!  I tried closing the IDE and the same old frame would appeared after I restarted it. Your advice to just close the form and then reopen it works like a charm   Thanks