Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. status bar from child forms?

status bar from child forms?

Scheduled Pinned Locked Moved C#
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    visiontec
    wrote on last edited by
    #1

    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

    H 1 Reply Last reply
    0
    • V visiontec

      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

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      You simply need to expose the StatusBar (or better yet, the StatusBar.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 a String property called StatusText:

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups