Questions tagged [onpaint]

An event that is triggered when a GUI component needs to be repainted

onPaint is the method responsible for performing the paint act triggered from a PaintEvent. This event is triggered when a GUI component needs to be repainted, usually as a result of a change to the underlying data behind the GUI component. onPaint is responsible for the physical display of the component, and in particular, applying the themes and colors appropriate for the application/output device.

198 questions
-1
votes
1 answer

Is there any way to call the OnPaint() method after certain conditions have been cleared?

My desktop is really messy at the moment so I decided to create a program where you can drag a file it and it creates a shortcut. When the file is dragged in, I grab the file's icon and name and save it, then draw them to the WinForm through…
Ipwnusck
  • 63
  • 1
  • 10
-2
votes
1 answer

OnPaint method not called for Child Controls - WinForms

I am using a Control. I have added two Panels in it as i would like to draw the multiple panels over a control. i overrided OnPaint() method for those two panels, but OnPaint() method of the first panel added to the control alone called, OnPaint()…
-3
votes
2 answers

How to Display Controls when using OnPaint Method in C#

How to Display Controls(e.g. RadioButton, Button etc.) when using OnPaint Method in C#? It is possible to create custom controls in constructor, but I need to use common controls of C#? Please suggest. I'm trying to display common controls but no…
1 2 3
13
14