In a parent form, I am trying to change the text on a statusbar panel from an event in a child form, but I don't know how to reference the statusbar control on the parent. I tried the following, but the control value for sbSB is null.
StatusBar sbSB = (StatusBar)this.Parent.Controls["sbStatusBar"]; sbSB.Panels[0].Text = "Active Form = Equipment Types";
I also tried the following, but the text did not get updated:
(this.Parent.Controls["sbStatusBar"] as StatusBar).Panels[0].Text = "Active Form = Equipment Types";
My goal is to update the statusbar text on the parent form to display the name of the form with focus.
Experience trumps brilliance -- Thomas Sowell