C# Reload/Redraw form upon settings update in dialog box

前端 未结 3 1336
北恋
北恋 2021-01-22 08:00

I have a C# Win Forms application where I dynamically draw buttons in a panel based on 2 properties in the class. Rows and Columns.

I also have a dialog box that opens,

3条回答
  •  孤城傲影
    2021-01-22 08:18

    You should not be doing any drawing outside of the Paint event of the form. This is why the form is not redrawing correctly. Move your custom drawing there and the redrawing should behave normally.

提交回复
热议问题