How to make "opening" window before "opening" object

Hi!

I have a question:

why the opening event of a listbox inside a window, runs before the opening event of the window itself?

i’m asking because i want to do a “init” on opening window event, so all the objects has already all information they need to show up.

how do you guys init / setup object variables inside a window? inside it’s own (object) “opening” event? one by one?

That is the way it’s designed. Control Opening events fire first. Window Opening fires after all the controls are open.

It is best to only put code in a control Opening event that refers to that control itself, no others. Any code that refers to multiple controls goes in the window Opening event, where you know they all exist.

3 Likes

By design. See this blog post:

2 Likes