Change event, when should fire

After reading <> I have some questions about the Change event and when it should fire.

After reading PopupMenu.Change it is clear that:

  • if I manually select other value from the PopupMenu, a Change event is fired
  • if I code something like PopupMenu.ListIndex = y (where it was x before)

The issue I see is:

  • By using DeleteAllRows, the ListIndex value will change (or stay) -1 and it doesn’t fire a Change event

Should DeleteAllRows fire a Change event?:
a) always
b) only when ListIndex <> -1
c) never

Workaround set ListIndex value to -1 (even if DeleteAllRows will have that effect).

PopupMenu1.DeleteAllRows PopupMenu1.ListIndex = -1 // will fire the Change event