C#.NET How to access fields in user control dynamically?

Posted by Conor H on Stack Overflow See other posts from Stack Overflow or by Conor H
Published on 2010-03-16T18:00:34Z Indexed on 2010/03/16 18:11 UTC
Read the original article Hit count: 292

Filed under:
|
|
|

Hi,

I'm making a settings screen at the moment that will have a radiobutton group which will determine what controls are displayed. The different settings are contained within a UserControl.

I am dynamically creating this UserControl like so:

panel = new btSettings();
this.Controls.Add(panel);
panel.Location = new Point(15, 49);

Just wondering how I can access the fields within this control and design time when the object will only be created during run time?

Thanks.

© Stack Overflow or respective owner

Related posts about usercontrols

Related posts about c#