How to draw a Thickness line?

Hi, I’m a beginner in the Xojo world.

It’s very interesting language, but I have some questions.
I need to draw a colored line with 20 pixels of thickness.
How can I do?

thanks to all.

bye bye Fabrizio (ITALY)

e.g. in the window event ‘Paint’:

Sub Paint(g As Graphics, areas() As REALbasic.Rect)  
  g.ForeColor = &cff0000
  g.PenHeight = 20
  g.PenWidth = 20
  g.DrawLine(10,50, 100,50)  
End Sub

Hello Peter,

The above answer is helpful for me too.

However, I would like to know, how to erase such an above drawn line.

Is there g.erase or anything similar out there ?

The Graphics documentation can be found here: Graphics — Xojo documentation
You can clear/erase an area with ClearRectangle

Thanks Tim for such a prompt response.
Appreciate the support !!!