You just need to cast. If you are prepared to assert the Target2
is a TLabel
then use a checked cast:
var
Lbl: TLabel;
....
Lbl := Target2 as TLabel;
Otherwise check using is
and then an unchecked cast is fine:
if Target2 is TLabel then
begin
Lbl := TLabel(Target2);
....
You don't need to destroy Lbl
because it is just a reference to an object that is owned by somebody else.