I have a c# windows form application that has a similar GUI functionality as MSN. It works in the way such that only a notification window appears if there is notification which in this case I have put several buttons and other stuffs in a single panel. (is this the right way to do so?)
How do I code it such that I can use a arrayList to add similar panels to the list and use a for loop to call it out. Example would be calling 2 or 3 similar panels through the use of arraylist(?) and for them to appear below one another. (Maybe like how MSN notifications window comes up one above another.)
the code for the panel is
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.lblImage);
this.panel1.Controls.Add(this.lblName);
this.panel1.Controls.Add(this.lblLinkName);
this.panel1.Controls.Add(this.lblLinkLocation);
this.panel1.Controls.Add(this.lblLocation);
this.panel1.Location = new System.Drawing.Point(13, 134);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(506, 100);
this.panel1.TabIndex = 17;
do I have to code the for loop in the designer file or the coding file? as after I have tried to add for loop in the designer code file, the designer view sort of unable to display my UI.
I’m guessing this is what you’re looking for
You’ll need to populate the panels array with a the points you’d like your panels to be added at.