I have two controls in C# that I override OnPaint()
to draw all the visuals myself.
I'd like to add one of those controls inside the other.
What do I put in my parent control's OnPaint()
to call the child control's OnPaint()
?
You don't specify winforms, but that seems very likely based on your question.
You are presumably calling Invalidate() or Refresh() depending upon your heart's desire.
Refresh() on a control should make the control and its children to repaint.
If you call Invalidate(true) on a control, the child controls should also receive the invalidate message. Invalidate() without the true parameters is not recursive.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.