Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

C# WinForms: ToolStripStatusLabel and ToolStripSeparator

How do these two work together?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of curiouswebster

ASKER

My WinForms C# program has definitions for ToolStripSeparator but I do not know where they were created ot how to access them. In the Designer.cs file

        private void InitializeComponent()
        {
            ...
            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
            this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
             
            ...
        }

        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;

A case insnesitive serach of my project for "Items.Add(tool" come up empty, so these are not being added.  

A different deverloper created the ToolStripStatusLabel as well as the ToolStripSeparator.  Any idea how?  The ToolStripStatusLabel is obvious, but the existence of the 3 ToolStripSeparators confuses me.
 

Thanks!
You can add them in design ou in code, but you should have access to what you've created (this.ToolStripStatusLabel .Item(0)...
I will drop the designer concern.  The question is how what type of object do I drag onto the form?

What type if the statusStrip1 in your example?
Thanks, got it.