Listbox detect text in all the populated cells of a specific column and color the text of row

I’d like to detect the text of all the cells of a specific column (7) of a listbox.
If the text is = “NO” then color the row of red.
I’m trying with:

If column = 7 and Listbox.SelectedRowValue = “NO” Then
g.ForeColor = &cFF000000
End If
Return False

But nothing happens …

Please, read the notes related to SelectefRowValue.
Where are you putting the posted code?
If is in the CellBackgroundPaint event you need to fill the graphics object with the color and return true.

if  (listbox.CellValueAt(Row, 7)="NO")  Then
etc
1 Like

http://documentation.xojo.com/api/deprecated/listbox.html#listbox-cellbackgroundpaint

On that page last example, replace “Red” with “No”.