macOS - happens when the menu is closed (selection is made) - regardless of whether the selection changed
Windows - Happens on click, regardless of user selection
Linux - Happens on click, regardless of user selection
[quote=440370:@Tim Jones] regardless of whether the selection changed
That just doesn’t seem right on any of them.[/quote]
This is how it has always behaved on Mac. If you need to determine whether the next value is different from the previous value you can implement that protection. We don’t have a SelectionMade event, so ignoring a selection just because it was the same value would make the Change event less useful.
mint 19 with 2019r1.1 I dont get mousedown but do get a change after an item has been selected
not right when the person clicks on it
you dont have code in a got focus or mouse down that changes the listindex do you ?
on windows & macOS using mousedown to store the current listindex would make it pretty simple to create a subclass that raise a “SelectionActuallyChanged” event
and you could do the same for keypresses since the popupmenu can get focus & be triggered by the keyboard
Okay - this is cruel - the issue is actually that the Listbox contents are updating because the PopupMenu drops down over the ListBox and that is what’s causing the “apparent” change. What I was checking was the CellBackgroundPaint event …