Draw a Line in a Panel Control?

  • Thread starter Thread starter Roger Odermatt
  • Start date Start date
R

Roger Odermatt

Hello

Can anybody help me, how can draw a line in a Panel Control?

I try it with this code:
---------------------------------
Dim myPen As New Pen(Color.White, 1)
Me.panDetail.CreateGraphics.DrawLine(myPen, iLeft, iTop,
Me.panDetail.Width - 24, iTop)
---------------------------------

But i can't see on my Panel!

What is wrong?

Thank you very much
regards Roger
 
Try creating a Paint event handler for the Panel (panDetail) and drawing the
line from there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top