change control property on inherited form from base form

  • Thread starter Thread starter ajwalters
  • Start date Start date
A

ajwalters

Hello,

I was wondering if anybody knew a way from the base form to change a
property of a control on the inherited form? I have a bunch of strings
(form name, control name, property name) and i want to set the property
to a new value (also a string). Does anybody know of a way to do this?
I have a feeling it requires reflection, but i am unsure.

Thanks in advance!
Adam
 
Adam,

Reflection is one solution. However all child controls (directly parented on
the form can be found in the form's Controls collection. This collection is
member of the Control class, so it is the same for both base and derived
form. If you can recognize your controls in this collection you can change
their properties from the base class.
 
Back
Top