Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
component property check ?
#1
Hi All,

Having the component loop working for a form, I want to use it to change some properties for individual components, based on user prefs.

How can I check for the presence of a certain property, like font, which is not something all components have ?

Using "if (selv.Components[i] as TIWCustomControl) is TIWLabel ..." requires IWCompLabel to be present in the Uses clause. 

If I want to check if the component has a font property, how can I do that without refering to the component type ?

And will it be possible to set, say font.size, for all IWLabels, IWButtons and IWEdits on the form, without having to include all the types in the uses clause ?

I'm trying to create a general procedure I can call in each forms create event, to avoid having to put all the code in every form.

Advises and examples are gracefully accepted

Regards
Soren
Reply


Messages In This Thread
component property check ? - by SorenJensen - 09-18-2019, 06:01 AM
RE: component property check ? - by kudzu - 09-18-2019, 02:08 PM
RE: component property check ? - by SorenJensen - 09-18-2019, 03:20 PM
RE: component property check ? - by kudzu - 09-24-2019, 02:57 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)