OOP Delphi

Title: How to Change the font for all controls at run-time
procedure ModifyFontsFor(ctrl: TWinControl);
procedure ModifyFont(ctrl: TControl);
var
f: TFont;
begin
if IsPublishedProp(ctrl, 'Parentfont')
and (GetOrdProp(ctrl, 'Parentfont') = Ord(false))
and IsPublishedProp(ctrl, 'font')
then begin
f := TFont(GetObjectProp(ctrl, 'font', TFont));
f.Name := 'Symbol';
end;
end;
var
i: Integer;
begin
ModifyFont(ctrl);
for i := 0 to ctrl.controlcount - 1 do
if ctrl.controls[i] is Twincontrol then
ModifyFontsfor(TWincontrol(ctrl.controls[i]))
else
Modifyfont(ctrl.controls[i]);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Modifyfontsfor(self);
end;
// Remember to add TypInfo to your uses clause.