Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
560
Performance Problem on repainting components in UltraGroupBox
posted

Hi there,

 I have some UltraGroupBox with a ViewStyle set to "Office 2007". All components on this GroupBox have set their background color to transparent

to look good. And this is eating up *much* performance, not on creating the form but on hide/showing.

 

How can this be improved? Can I disable the repainting and the enable this when the form is updated completely?

 

Thanks,

Frank

Parents
  • 37774
    posted

     Frank,

     I'm not sure that you can prevent painting on the form itself, but you could call BeginUpdate/EndUpdate on the UltraGroupBox while you perform any logic that would cause subsequent paints.  The issue that you're experiencing is mainly due to the way that .NET transparency works, in that a child control will ask its parent to draw into the child's area in order to get the background, and will walk up the chain of parents until a non-transparent color is found; naturally this could be expensive when you have a lot of controls.  The best way to improve performance would be to set the colors yourself on the controls instead of using Color.Transparent.

    -Matt

Reply Children