Dim rs As RecordSet
Dim SQL As String
SQL=_
"SELECT DISTINCT deviceName,device_id,isIphone"+_
" FROM TEMPLATE.devices " +_
" WHERE device_id<>"+Str(current_DEVICE.ID)+_
" ORDER BY isIphone desc,deviceHeight"
Call DB_PROJECT.DB_Select(SQL,rs)
While Not rs.eof
Dim dev As String = rs.field("deviceName").StringValue
Dim tag As Integer = rs.field("device_id").IntegerValue
Me.AddRow(dev)
Me.RowTag(Me.LastIndex) = tag
me.ColumnType(0) = listbox.TypeCheckbox
rs.MoveNext
Wend
Me.ListIndex=0
Listbox Cell Click Event
If row>lb(index).ListCount Then
Return False //< BREAKPOINT HERE.. NEVER FIRES
End If
If lb(index).CellState(row,column)=checkbox.CheckedStates.Checked Then
lb(index).CellState(row,column)=checkbox.CheckedStates.Unchecked
Else
lb(index).CellState(row,column)=checkbox.CheckedStates.Checked
End If
Return true //< BREAKPOINT HERE.. NEVER FIRES
Cell Background Paint
If row>lb(index).ListCount Then
Return False //< BREAKPOINT HERE.. NEVER FIRES
End If
g.ForeColor=Color.orange
If lb(index).CellState(row,column)=checkbox.CheckedStates.Checked Then
g.ForeColor=Color.Yellow
Else
g.ForeColor=Color.magenta
End If
g.fillrect 0,0,g.Width,g.Height
Return False //< BREAKPOINT HERE.. NEVER FIRES
I would EXPECT the cell to be ORANGE, YELLOW or MAGENTA… but no, its white… .and since the BP don’t work, I can’t find why
The idea is to have a checkmark, and if the user clicks ANYWHERE in the cell the Checkmark switchs. If the Mark is ON, the cell should be yellow, if it is OFF it should be magenta
nope… just a plain old listbox, with the events from above… nothing move
It is in a Groupbox… but I pulled it out to the main window, and nothing changed
Break points on return statements have been dodgy for a while and getting worse
There are several bug reports about break points being skipped
Try a plain BREAK statement of put in something like
if 1 = 2 then // break statement here
break
end if
Silly idea, but maybe drag a new listbox on to the window and see if the events fire on it. I’ve seen strange things get fixed when instantiating a new one.