Drawing a border around a Canvas?

Hey all,

I’ve combed over the documentation, but I can’t find something that addresses this. I’m wanting to draw a light grey, 2-thickness border around a Canvas, but can’t seem to figure out the code to do this, or if its even possible.



g.ForeColor = &cC2C2C200
g.PenHeight = 2
g.PenWidth = 2
g.DrawRect 0, 0, me.Width, me.Height

If you want the canvas to remain transparent, this draws a border in the Paint event.

Sub Paint(g As Graphics, areas() As REALbasic.Rect) g.ForeColor = &cC2C2C200 g.PenHeight = 2 g.PenWidth = 2 g.Drawline(0,0,me.width,0) g.Drawline(0,0,0,me.height) g.Drawline(me.width-2,0,me.width-2,me.height) g.Drawline(0,me.height-2,me.width-2,me.height-2) End Sub

Thanks Axel (and Michel) for the info!