theAsocialApe
Member
- Joined
- Mar 21, 2008
- Messages
- 13
- Programming Experience
- 5-10
I'm stumped here.
I've got a user control with one to infinity minus 1 instances of another user control in it.
at some points, I need to call the same method on those controls (ex. user presses the clear button on the big control, I want to call the clear f(x) on each of the controls)
I thought to toss the controls in a collection, and then be able to handle them something like this:
turns out, and I should have realized, methods and properties of controls are not exposed when treated this way. The only thing that can be seen is the stuff that the base class (control, I guess) has.
I know there's always other ways to attack a problem, and I could figure something else out, but if this is an acceptable way to approach this, I'd like to go at via a collection of my controls.
I've got a user control with one to infinity minus 1 instances of another user control in it.
at some points, I need to call the same method on those controls (ex. user presses the clear button on the big control, I want to call the clear f(x) on each of the controls)
I thought to toss the controls in a collection, and then be able to handle them something like this:
VB.NET:
for each c as control in myControlCollection
c.clear()
next
turns out, and I should have realized, methods and properties of controls are not exposed when treated this way. The only thing that can be seen is the stuff that the base class (control, I guess) has.
I know there's always other ways to attack a problem, and I could figure something else out, but if this is an acceptable way to approach this, I'd like to go at via a collection of my controls.