Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Definelife on Jan 11, 2010 01:39
open dhtmlx forum
Window hide

Dear Support,

Just after the creation of the window object I hide the window. I initialize all components of the window object and then I make it visible. But the window object appers empty. After the making window object fullscreen becomes all the components visible. In that case layout object does not resize properly.

How can I succesfully hide a window , put the components in it and make it visible again?

Thanks in advanced,
Answer posted by Alex (support) on Jan 12, 2010 02:07

Hello

unfortunately it isn't possible to initialize components in the hidden window.

Answer posted by devanhoe on Jan 19, 2010 08:54
You could try something like this.  dhtmlx components obviously don't initialize properly when set display:none, but they do when they are set visibility:hidden.  Unfortunately IE8 doesn't understand visibility: hidden very well so you have some more work after this.

function window() {
win = layout.dhxWins.createWindow( ... )
win.style.visibility = 'hidden';  // not display = 'none';   that will not work
... do all your initialization, load the window
setTimeout("reveal", 100);
}

function reveal() {
   win.style.visibility = 'visibility';
}
Answer posted by Definelife on Jan 20, 2010 00:22

Devanhoe,

It works as I want. Thank you very much.