Changing text labels on a parent form?

  • Thread starter Thread starter Opettaja
  • Start date Start date
O

Opettaja

How would I go about changing text labels on a parent form from a
child? For example Changing text labels on Form1 from Form2, and Form2
is opened from Form1? Any suggestions would be greatly appreciated.
 
Opettaja said:
How would I go about changing text labels on a parent form from a
child? For example Changing text labels on Form1 from Form2, and Form2
is opened from Form1? Any suggestions would be greatly appreciated.

Two ways off the top of my head.

1. Passing a reference to Form2 from form1. Then make a public property
in form1 that accepts the string.
2. Have Form1 subscribe to an user defined event in Form2, and then fire
off the event whenever the label needs to change
 
Back
Top