Listbox: Unwanted hairline after resizing

When I use the CellBackgroundPaint-Event of a Listbox, activate the Listbox property AllowResizeableColumns and also resize the columns, a thin white hairline is drawn over the Listbox. Is there a way around this?

[code]If row Mod 2 = 0 Then
g.DrawingColor = Color.Blue
Else
g.DrawingColor = Color.Red
End If

g.FillRectangle(0, 0, g.Width, g.Height)

Return False[/code]

Oh there was a blog post specifically about this, it’s because of HiDPI and using integers instead of doubles. I wish I could find the post.

does it go away if you use g.width+1 and g.height+1 for the draw command?
that may add the one pixel missing, I presume.

[quote=493247:@Christian Schmitz]does it go away if you use g.width+1 and g.height+1 for the draw command?
that may add the one pixel missing, I presume.[/quote]
Sadly, your suggestion does not correct the issue.

You got a workaround Tim?

those red and blue colors are diabolical … you should have added a note that the post could induce seizures

This is a test. I would never use such a color UI disaster productively!

These colors (as inverted by El Capitan) are nice…

turn anti aliasing off as well otherwise you get anti aliased edges and when you have 2 together it looks like a white line