Live Chat Icon For mobile
Live Chat Icon

How to determine which Panel in the Windows Forms StatusBar Control is Clicked ?

Platform: WPF| Category: StatusBar

private void statusBar1_PanelClick(object sender, 
System.Windows.Forms.StatusBarPanelClickEventArgs e)
   switch (statusBar1.Panels.IndexOf(e.StatusBarPanel))
      case 0 :
         MessageBox.Show('You have clicked Panel One.');
      case 1 :
         MessageBox.Show('You have clicked Panel Two.');
//Place the following code in the form’s constructor to register the event handler.

   this.statusBar1.PanelClick += new 

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.