Something like this
In a module define a global method as
Sub setFont(extends rc as rectcontrol, theFont as string)
dim ti as Introspection.TypeInfo = Introspection.GetType( rc )
if ti <> nil then
dim pi() as Introspection.PropertyInfo = ti.GetProperties()
for i as integer = 0 to pi.Ubound()
if pi(i).Name = "TextFont" then
pi(i).Value(rc) = theFont
end if
next
end if
End Sub
Then on the window just loop over all the rectcontrols calling setfont with whatever the new font name is like
Sub setFont(theFontName as String)
for i as integer = 0 to Window1.ControlCount - 1
if Window1.control(i) isA RectControl then
dim rc as RectControl = RectControl(Window1.Control(i))
rc.SetFont(theFontName)
end if
next
End Sub
handles all rectcontrols that have a textfont property - base or subclasses