How to draw line on child canvas panel?

I add a child canvas panel, but On Paint still draw on the parent canvas. How to draw on the child panel?