Slow panel enable / disable  
Author Message
ESTAN





PostPosted: Visual C# General, Slow panel enable / disable Top

Hello,

I have a panel with 3 groupbox's

- groupbox 1 contains: 17 Labels and 12 Textbox's
- groupbox 2 contains: 14 Labels, 1 Combobox and 13 Textbox's
- groupbox 3 contains: 4 Labels and 4 Textbox's

I need to enable/disable the panel so that all the input controls are enabled/disabled. Well this takes a lot of time, you can see that the disable starts from the top till the bottom. With enable i have the same effect.

Is there a way to speed this up Maybe my method that I use is not the best, can you suggest me another

Thanks.



Visual C#5  
 
 
ahmedilyas





PostPosted: Visual C# General, Slow panel enable / disable Top

which "panel" are you talking about the group box If so, just disable it and all controls inside will be disabled.

 
 
ESTAN





PostPosted: Visual C# General, Slow panel enable / disable Top

the 3 groupbox are the controls on the panel.

So if i call panel.enable = false, all the controls on that panel will be disabled, in this case the 3 groupbox's with there own controls configuration as stated above.

The enable and disable work fine, only it happens very slowly.


 
 
boban.s





PostPosted: Visual C# General, Slow panel enable / disable Top

Maybe this will help:
panel.Visible = false;
panel.Enabled = !panel.Enabled;
panel.Visible = true;



 
 
Ger Ron





PostPosted: Visual C# General, Slow panel enable / disable Top

Thanks, I notice a performance improvement. I think I can live with that.
 
 
ESTAN





PostPosted: Visual C# General, Slow panel enable / disable Top

Thanks, That would do the job.