C# MDI: How to change parent status label to active child form name -
C# MDI: How to change parent status label to active child form name -
i working on windows forms mdi application can create new kid forms within itself. parent form has statuslabel in statusstrip. trying figure out how alter statuslabel text value of parent form name of active kid form. have created "activated" event in kid form don't know how alter parents form statuslabel child's forms "activated" code block.
basically want alter label in parent form to kid forms name property.
any help appreciated.
try subscribing activated event of kid form:
protected override void onload(eventargs e) { base.onload(e); (int = 0; < 3; ++i) { form f = new form(); f.activated += f_activated; f.mdiparent = this; f.text = "form #" + i.tostring(); f.show(); } } void f_activated(object sender, eventargs e) { toolstripstatuslabel1.text = ((form)sender).text; }
c# forms parent-child mdi toolstripstatuslabel
Comments
Post a Comment