status bar from child forms?
C#
2
Posts
2
Posters
0
Views
1
Watching
-
hi there i have an mdi form which has a few child forms in the mdi form i have a status bar how can i add text to the status bar from the child forms? VisionTec
You simply need to expose the
StatusBar
(or better yet, theStatusBar.Text
property for a better OO design in reference to encapsulation and protection) on the main form. Your child forms could so something like this, assuming that your main form (ex,MainForm
) had aString
property calledStatusText
:MainForm form = (MainForm)this.MdiParent;
form.StatusText = "Hello, world!"Honestly, how you provide access to status bar is completely up to your implementation. This is simply a matter of creating a good object-oriented design.
Microsoft MVP, Visual C# My Articles