StatusBar.Panels.Add : StatusBar « System.Windows.Forms « C# / C Sharp by API






StatusBar.Panels.Add

 
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.new StatusBar()
2.StatusBar.Items.AddRange
3.StatusBar.Panels
4.StatusBar.ShowPanels