I need to run code when a TFrame
is created, not when the frame shows, or when the parent form is created. I don't see any event handler for OnCreate
for my TFrame
.
How would one then be able to run code when a frame is created?
I am using Delphi 11.3 and my project is using FMX (Firemonkey)
Simply
override
the virtualCreate() constructor
or virtualAfterConstruction()
method.To
override
theCreate() constructor
, addconstructor Create(AOwner: TComponent); override;
into your frame's private declarations and then pressCtrl+Shift+C
to create the constructor below. It should create something like this: