Windows OS - Canvas Can't Show FocusRing

I’ve been trying to get a custom canvas control to show a focus ring, but have had no luck. I’ve searched the forum and docs, but haven’t found a solution to make it work. I can of course simulate a focus ring, but would rather have the system display it. Does anyone know of a topic that addresses this? Is it my code causing the problem or is it a known issue on Windows OS?

I was unable to find a mention of a Focus Rectangle (as Microsoft calls it) for canvases. The LR mentions that


I would be tempted to conclude that the focus ring is not supported under Windows and Linux.

That said, this in the Paint event does rather nicely. You may even do a gradient for extra nicety.

g.ForeColor = &c0080FF00 g.DrawRect(0,0,g.width,g.height)

As always thank you for taking the time to help. I had read the docs on Focus Ring and pretty much concluded the same as you.

I’m using the same code you posted to highlight certain portions of the control when it has focus. It’s working out great. To me it looks better than the focus ring.

Once again… thanks.