After reading <https://xojo.com/issue/53735> 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?:
b) only when ListIndex <> -1
Workaround set ListIndex value to -1 (even if DeleteAllRows will have that effect).
PopupMenu1.ListIndex = -1 // will fire the Change event