E. StatusStrips

  1. Extending the StatusStrip class works in essentially the same way as the previous MenuStrip example: you fetch the extension site, create the objects that go into it (ToolStripStatusLabel in this case), and add them with the site's Add method. The code is shown at the top of the facing page. You often don't hook up command handlers for StatusStrip panels because they are used primarily for display, but if you did, the procedure would work the same way as the MenuStrip example that precedes this one or the ToolStrip example that follows it.

    When I create the ToolStripStatusLabel object, I save it in a member variable for later use. When the user selects the Toggle Status Pane item from the menu, I run the command handler you see ...

Get Programming Microsoft® Composite UI Application Block and Smart Client Software Factory now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.