Advertisements
If you've used StatusBar control in Visual Studio .NET, you must be annoyed when you wanted to add a progress bar, a drop down control, or an image to the StatusBar.
StatusStrip control available in Visual Studio 2005 is a powerful StatusBar control with the features provided by StatusBar in previous versions. Besides the StatusBar features, StatusStrip also provides ProgressBar, DropDownButton, SplitButton, and Label features, which means we can add a progress bar, a drop down button, a spit button, or a label control to the StatusStrip itself.
If you drag a StatusStrip control from Toolbox to the form, you will see an option to set various actions such as StatusStripPanel, ToolStripProgressBar, ToolStripDropDownButton, and ToolStripSplitButton.
You can set various Actions of StatusStrip control such as behavior, layout and appearance and also edit items from Actions dialog.
Edit Items link launches Item Collection Editor, where you can add Panel and ProgressBar controls to the StatusStrip control. After adding StatusStripPanel and ToolStripProgressBar controls, these controls can be managed as individual controls an you can set their properties from Item Collection Editor itself. See Figure 3.
Figure 3. Item Collection Editor.
After adding a panel and progress bar control, StatusStrip
Now new ProgressBar control is more powerful then ever. You can even set foreground color of it, which used to be a pain in previous versions. I set green as forecolor of ProgressBar and set its Value property to 30.
Summary
Windows Forms 2.0 StatusStrip control replaces previous Windows Forms StatusBar control. The StatusStrip control is more powerful control than StatusBar provides many built-in features such as progress bar, status bar, dropdown button, and splitter. In this article, I discussed how to create and use StatusStrip control and its features using Visual Studio 2005 IDE.