Form not updating usercontrol

Posted by user328259 on Stack Overflow See other posts from Stack Overflow or by user328259
Published on 2010-04-30T15:28:25Z Indexed on 2010/04/30 19:47 UTC
Read the original article Hit count: 327

Filed under:
|

From the post "Growing user control not updating"... Using C#, .Net 2.0 in a Windows environment.

UserControl1 - draws cells to a bitmap buffer dependent upon NumberOfCells property UserControl2 - panel contains UserControl1 which displays vertical scroll when necessary; also contains NumberOfCells which sets UserControl1's NumberOfCells. Formf1 - contains NumericUpDown controls (just increments) which updates the UserControl2 - suppose to!

When I increment the control on the form by say 20, UserControl1 adds the necessary cells, UserControl2 displays the vertical scroll bar accordingly, BUT the form does not 'redraw' to the updated/correct image!! Meaning, after I increment by 20, cells are added, vertical scrool bar added... but the image shown is just everything else expanding.

I reset the control to scoll to the very TOP and the scrolling works, but the image is still staic... UNTIL I resize my form, more specifically, when I change it from maximize to window or vice versa!!!

What can I do to 'reset/redraw' the correct image???? Thank you in advance.

  • Lawrence

© Stack Overflow or respective owner

Related posts about usercontrol

Related posts about resize