By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,773 Members | 1,779 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,773 IT Pros & Developers. It's quick & easy.

Linklabel creation speed

P: n/a
Bob
Hi,
I have a userform that has a bunch of linklabels on it, that are in a
column. The creation of it is quite slow, somewhat proportional to
the number of labels. For instance, a form with 300 labels takes
about 2 seconds to create. Is there any property I can set (ie
delaying the paint until all the labels have been added, etc) that
will speed this up. The current code is below
arrOfLinkedLabels = new LinkLabel[allLineFormats.Length];
for (int i = 0; i < allLineFormats.Length; i++)
{ arrOfLinkedLabels[i] = new LinkLabel();
arrOfLinkedLabels[i].Text =
allLineFormats[i].LabelText;
arrOfLinkedLabels[i].Parent = myChooserPanelHere;
arrOfLinkedLabels[i].MouseClick += mouseClickHandler;
arrOfLinkedLabels[i].PreviewKeyDown+=keyDownHandler;
arrOfLinkedLabels[i].Top = arrOfLinkedLabels[i - 1].Bottom;
}

Thanks,
Bob

Apr 18 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.