Slow panel enable / disable

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.



Answer this question

Slow panel enable / disable

  • GRK

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

  • Attila Fogel

    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.


  • Jamie Thomson

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

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



  • SPECIALK_BC

    Thanks, That would do the job.


  • Slow panel enable / disable