change control property on inherited form from base form

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
 
S

Stoitcho Goutsev \(100\)

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top