ListBox row does not fully visually select

I have a Listbox with several columns. Clicking on any of the cells for a line does trigger the Change() event; however only the cell in the first column shows as selected, not the entire row. Programmatically selecting the line (aListBox.listIndex = n) also has the same effect.

This problem occurs in 2017r2.1 for WIndows, but NOT for Mac – where the entire line gets properly visually selected.

Any suggestions?

Do you have any code in the CellBackgroundPaint event?

Yep. Sure do:

// Highlight alternating rows If (Row Mod 2 = 0) Then G.ForeColor = AltRowBackgroundHighlight G.FillRect(0, 0, G.Width, G.Height) End If

Presumably I can check and manually paint all cells in a selected row with the selection background color in this loop… And then figure out how to get the text in those cells painted in white?

Why does this differ for Mac vs Win however?

If you read the docs, you’ll see that the selection may have already drawn. I suggest that your code first say:

if me.Selected(row) then Return Fslse End if

I tried that, with both “me” and “self”, but no difference. I can’t find any other references to AltRowBackgroundHighlight color in the code. Still strange it works ok as is on Mac version.

ANy other suggestions?

try to reproduce it in a simple project. if you can, make the sample available for us to look at.