I'd revamp this thread to ask if anybody fond a solution, in the end.
I'm experiencing the same problem here, or anyway something similar. In particular:
* I have a listBox, which is populated dynamicall; the default list item selection is done programmatically, too (by querying a db).
Since it is a quite long list, often it happens that the selected item falls out of the visible listbox field. I guess a redraw would solve the issue but I wasn't able to get it.
* I have also a button, which by default is disabled. If certain conditions are verified, then it is enabled. Again, that button is not refreshed in the UI and always appears as disabled.
Everything is set before actually showing the window with the .show() method.
I didn't try to call the onShow() callback, but I guess that won't make any difference since, according to the docs, it is anyway executed before displaying the window.
I've been trying all the above, and other tricks from other websites, but nothing worked.
Any hint?