Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table layout panel - slow loading 2

Status
Not open for further replies.

bluntbill

Programmer
Jun 7, 2006
57
PT
I have an application, in which I use a table layout panel. The program adds and removes dinamically combo boxes, text boxes and labels to the layout panel, depending on some input by the user. The problem is that sometimes it is required to add 50+ childs to the table layout panel, and it takes forever to get it done...Does anyone know a quicker way to do this, or how to speed up the process?

Thank you
 
Turn off the drawing on the tablelayoutpanel

tableLayoutPanel1.SuspendLayout();

//move/add/delete controls here

tableLayoutPanel1.ResumeLayout(true); //perform layout

Give that a try. If this doesn't work - try making the tablelayoutpanel invisible while you do the work and then show it when it's done.

 
thanks a lot :)

suspending the layout worked out just fine. Something that used to take 20+ seconds now takes 2/3 seconds.

You deserve a star for that :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top