Hi!
I am newbie.
I have placed 10 labels of different colors at a windows form. The problem is that when i open that form in debugging mode, the display is so slow.Lables open one by one giving the application a very slow feeling. placing 2 or 3 lables works just fine.If any one can suggest me any method to avoid this?
Any help would be appriciated.
Awais TanveerPosted Dec 15, 2007, 6:56 AM
AlanPosted Dec 14, 2007, 10:27 AM
I've never used the TableLayoutPanel control but I suspect that it could be the culprit as, according to the docs, it lays out its contents dynamically and may therefore be redrawing as each Label is added.
Does it make any difference if you place the Labels inside an ordinary Panel or directly on the form?
Awais TanveerPosted Dec 14, 2007, 8:13 AM
AlanPosted Dec 14, 2007, 7:00 AM
I'm surprised that you're having problems with drawing speed because, as controls go, Labels are very simple and lightweight.
If you're creating the Labels at runtime, then I'd try creating them at design time instead and, if you don't want them to show up immediately, set the Visible property to false. You can then change it to true at runtime when you want the Label to be displayed.