OnShow event is fired when PanelVisible property changes its value. But, since PanelVisible value is True by default, this value is not changed on initialal layout loading (it remains True); so, OnShow event is not fired.
Another one problem is, when exactly OnShow should be fired during initialization. Firing it too early will not help, but actually, panels become visible too early...
So, the best way for you is to iterate all visible panels and fire their OnShow events manually. You can do this, for example, in your main form's OnShow event handler. Actually, this is much clear way, and you will be sure, that whole form is already loaded and initialized.
Comments