How to get the handle of a control after adding it programmingly

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, Guys
After adding a control into a container programmingly, for example, myForm.controls.add(myControl), how can I reference this control in my code

Thank
william
 
Just use "myControl". This is a reference to the control itself. If you have
created this control inside a method then you can move the declaration for
the control to have member scope inside the form class. This would allow you
to access the control just like any other. Or have I missed something?

--
Tim Wilson
..Net Compact Framework MVP
{cf147fdf-893d-4a88-b258-22f68a3dbc6a}
william said:
Hi, Guys,
After adding a control into a container programmingly, for example,
myForm.controls.add(myControl), how can I reference this control in my code?
 

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

Back
Top