Add StatusPanels to StatusBar : StatusBar « GUI Windows Form « C# / C Sharp






Add StatusPanels to StatusBar

 
using System;
using System.Drawing;
using System.Windows.Forms;
   
class TwoStatusBarPanels: Form
{
     public static void Main()
     {
          Application.Run(new TwoStatusBarPanels());
     }
     public TwoStatusBarPanels()
     {
          Text = "Two Status Bar Panels";
          StatusBar sb = new StatusBar();
          sb.Parent = this;
          sb.ShowPanels = true;
   
          StatusBarPanel sbpanel1 = new StatusBarPanel();
          sbpanel1.Text = "Panel 1";
   
          StatusBarPanel sbpanel2 = new StatusBarPanel();
          sbpanel2.Text = "Panel 2";
   
          sb.Panels.Add(sbpanel1);
          sb.Panels.Add(sbpanel2);
     }
}

 








Related examples in the same category

1.Display message in StatusBar
2.Use Label as status barUse Label as status bar
3.Add icon to statusbarAdd icon to statusbar
4.Display current time on statusbarDisplay current time on statusbar
5.Display menu item alert message on the statusbarDisplay menu item alert message on the statusbar
6.StatusBar with two panelsStatusBar with two panels
7.Status bar: display time and prompt message for menu itemStatus bar: display time and prompt message for menu item
8.StatusBar ExampleStatusBar Example
9.Status Strip Example
10.Use StatusBarPanel
11.Set Text to Statusbar