I have two listboxes that display the contents of two different directories (by dragging a folder from the Finder onto each of them)
The objective is to compare each cell between the 2 tables and change the text color to RED in the second listbox if its cell value doesn’t equal that of the 1st listbox.
Here is my code in the event handler:
dim source as Listbox = lstbox1
dim destination as Listbox = lstbox2
For i as integer = 0 To source.ListIndex - 1
//System.DebugLog(source.cell(i, -1) + " " + destination.cell(i, -1))
If source.Cell(i, -1) = destination.Cell(i, -1) Then
g.ForeColor = Color.Green
else
g.ForeColor = Color.Red
End If
next
What I’ve noticed is that this handler will run as many times as there are rows of data.
Is there a different handler I should be using so that it will only run once?