views:

378

answers:

1

I have window with few widgets inside. When it is rendered, it shows in top left corner for a second and then is centered.

Is there any chance to lazy rendering? I mean that window is centered first and then child widgets are rendered. Or maybe I can hide window content behind mask during it is rendered?

+1  A: 

DeferredCommand might help the situation a bit, by waiting for all the current events to be handled - that way when it's time to render the box, the browser might be less loaded.

You could 'emulate' lazy renedering by showing the box first outside the client area using one of the many tricks for that (like overflow:hidden; text-indent:-9000px; visibility:visible;) and then removing that style - the box should automagically appear at the center of the client area.

Igor Klimer