Horizontal lines every second row in listbox

I’ve just gotten a report from a Windows test user that all of the listboxes in my app have a white horizontal line displayed under Windows 10 on a Surface Pro and a Surface Studio. I then loaded the built app (built with 2018r2 release) onto my Surface Pro and I see the same issue. The key may be related to all of the tested systems have the font scaling set to 125%

Anyone else?

I have verified that running the platform with scaling set to 100% removes the lines, and 150% causes the lines to appear for each row. Verified on 5 systems now.

Just tested it and found the same problem, it looks like a rounding error on row height (and width) calculations for hidpi systems. The framework probably needs to use Ceil instead of Round as per a mouse problem I found a while back.

This should get around the problem until its fixed.

Just row fix:

g.FillRect(0, -1, g.Width, g.Height+1)

Row and column fix:

g.FillRect(-1, -1, g.Width+1, g.Height+1)

You could code in the temp fix to only happen on a scaling factor that doesn’t divide into 100 as 200% also looks fine.

Thanks, Julian. That sorts it properly for the time being.

No probs, I added a ticket for this feedback://showreport?report_id=53000

Ahha, William has kindly pointed out on the ticket that it’s not a bug. I keep forgetting that sizes don’t change with hidpi changes.

Take a look here for the explanation https://blog.xojo.com/2017/02/15/fractional-scale-factors/