Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I would like to know if there is a way to see if a Component
has a certain property.
I am looping in Components like so
For liC := 0 to Component.ComponentCount - 1 do
procedure AssignFontProperty(AComponent: TComponent; AFont : MyFont)
// 1) I would like to know what is Component[liC] class
// 2) Then cast this component into its class
// 3) Check if it has a font Property
// $) If it does, then assign AFont to Font property
// Exemple of what I would like to have.
Class = AComponent.Class;
if (Class(AComponent) has Font)
then Class(AComponent).Font = AFont;
Is This Possible ????? Is there a way of doing this ???