سؤال

I have a dynamically created chart in my child form that I wish to modify from parent.

How do I modify a dynamically created control on child from parent and vise-versa.

هل كانت مفيدة؟

المحلول

Add a method in the child form (or better yet, its base class if you are using inheritance) that the parent can call. In the Parent form, use ActiveMDIChild to get a reference to the form, cast to the child's class, and call it.

Once you are in the method, you can act on the (local) control.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top