Dialog ListBox - Unexpected Behaviour

As a prelude to my real listbox related question, which will come later once I have a better understanding of the following, here are four test dialog buttons with related comments.

ListBox1.dcf (3.0 KB)

When a listbox is defined in script resources BEFORE buttons are defined then the first press of any button triggers an unexpected listbox event followed by the relevant button event. Why?

ListBox2.dcf (2.8 KB)

When a listbox is defined in script resources AFTER buttons are defined then the first press of any button immediately triggers the relevant button event. This is as expected.

ListBox3.dcf (3.1 KB)

Reference to an undefined listbox object label/title triggers an exception. Why?

ListBox4.dcf (3.2 KB)

Reference to a defined listbox object label/title triggers an exception. Why?

Which event?

Does the listbox have input focus at the time of the event?

:face_with_open_eyes_and_hand_over_mouth: Of course! I forgot about the focus event and that answers all of my questions. Thanks as always @leo.