Home > Net >  Redrawn winform custom controls
Redrawn winform custom controls

Time:09-26

Custom a GDI drawing control, the control of the paint in the paint event,

controls in the following methodPublic void AddData (List Data)//dynamically add some
{
For (int I=0; i The DataList. Add (Data [I]);//on the list to add data

Enclosing Invalidate ();
}
I call this method in the external page not redrawn,
But inside the control to invoke this method will be redrawn, want to ask what is the problem

CodePudding user response:

And external no relationship, if you call is not displayed in the interface on the object instance

CodePudding user response:

This Invalidate ()
This is the current class, for example, you are in the Form1_Load calls, this means Form1, redrawn Form1

CodePudding user response:

reference 1/f, guiyang horse Ma Shanfu plugging waterproof engineering professional maintenance of swimming pool response:
and external no relationship, are you calling is not displayed in the interface on the object instance


after sticking only to find that is the problem
  •  Tags:  
  • C#
  • Related