J
JD
I've got a user control that has a number of labels on it. The control has
an UpdateDisplay() method that goes through and sets the .Text property for
those labels based on some calculations. Most of the controls update
quickly, but some of them have slightly more complex calculations. The
effect in the UI is of the control being painted from top to bottom.
I'd like the text to all appear to change at once, even if there is a slight
delay while the calculations happen.
I tried to wrap the UpdateDisplay() code with this.SuspendLayout() and
this.ResumeLayout() -- unfortunately, the docs indicate that this is only
useful for layout-related updates (size, position, dock, anchor).
Is there a way to tell a user control to suspend the painting of itself
while a number of its member controls are updated, and THEN paint them all
at once?
Regards,
JD
an UpdateDisplay() method that goes through and sets the .Text property for
those labels based on some calculations. Most of the controls update
quickly, but some of them have slightly more complex calculations. The
effect in the UI is of the control being painted from top to bottom.
I'd like the text to all appear to change at once, even if there is a slight
delay while the calculations happen.
I tried to wrap the UpdateDisplay() code with this.SuspendLayout() and
this.ResumeLayout() -- unfortunately, the docs indicate that this is only
useful for layout-related updates (size, position, dock, anchor).
Is there a way to tell a user control to suspend the painting of itself
while a number of its member controls are updated, and THEN paint them all
at once?
Regards,
JD