tags:

views:

362

answers:

3

Hi,

I'm developing an user control that I need for a project, the control have around 13 rows, 7 columns of textboxes, comboboxes... everything on a form autoscrollable. The problem is that in execution time when scrolling the content refreshing is very very slow. Some idea?

Using a datagridview is not an option.

Edit:

I should be more specific, the 13 row controls are in the usercontrol. I have changed the uc's doublebuferred property to true, I can't change the child controls because all them are standard text and comboboxes, so there isn't such property. In the main form I'm creating around 7 of this usercontrols dynamically inside of an autoscrollable panel, the problem comes scrolling the panel, the refresh is extremely slow. And yes, I neither can believe that the winforms could be so bad.

Regards.

A: 

Try using DoubleBuffered = true within the constructor of your UserControl.

Frederick
Nothing change :S
MazarD
You need to make the UserControl *AND* all the child controls double-bufferred (DoubleBufferred = true)
mjmarsh
All the child controls are textboxes, controlboxes and some checkboxes. It don't have this property
MazarD
A: 

Are any of the child controls custom controls too? Perhaps there is a problem in one of the drawing routines that isn't so noticeable when there are a few of them but really hurts with lots? Any handlers to spammy events such as mouseMove doing too much in a handler in the container control?

I'd find it hard to believe that WinForm falls over on a modern pc when you hit 91 controls.

Quibblesome
A: 

You need to set the user control and all the child controls to double-buffered. (control.DoubleBufferred = true)

mjmarsh