ListBox CellClick event doesn't fire on Windows

Does anyone have an idea of why a listbox would not receive a CellClick event on Windows (works on Linux and macOS)?

I have the following Events applied:

Function ConstructContextualMenu(base as MenuItem, x as Integer, y as Integer) Handles ConstructContextualMenu as Boolean
Function CellBackgroundPaint(g As Graphics, row As Integer, column As Integer) Handles CellBackgroundPaint as Boolean
Function CellClick(row as Integer, column as Integer, x as Integer, y as Integer) Handles CellClick as Boolean
Function CellTextPaint(g As Graphics, row As Integer, column As Integer, x as Integer, y as Integer) Handles CellTextPaint as Boolean
Sub Change() Handles Change
Function ContextualMenuAction(hitItem as MenuItem) Handles ContextualMenuAction as Boolean
Sub DropObject(obj As DragItem, action As Integer) Handles DropObject
Function KeyDown(Key As String) Handles KeyDown as Boolean
Sub Open() Handles Open

Here’s the CellClick function:

Function CellClick(row as Integer, column as Integer, x as Integer, y as Integer) Handles CellClick as Boolean
  If Not IsContextualClick Then
    Try
      Select Case Me.RowTag(row)
      Case RowType.OperationTop // fake header row
        Return True
      Case Else
        Return False
      End Select
    Catch NilObjectException  // Error's not being thrown ...
      Return True
    End Try
  Else
    Return False
  End If
End Function

Again, this logic works on Linux and macOS.

2022r1, Windows 10 21H1

I’ve seen an issue that looks like this on macOS with Lifeboat, but it’s not regularly reproducible so I don’t know how to report it yet. There was another thread recently that may be related to your issues, Desktop app ListBox not firing CellClick event when clicked

Can you step through the code in the debugger and reproduce this? I wonder if it’s a OutOfBoundsException instead, and that’s messing up your logic?

The event never fires, so no … :frowning: