PDA

View Full Version : tab close images don't always show in IE6 for borderlayout



vtswingkid
1 Dec 2006, 6:58 AM
No problems with firefox and opera.

When adding new panels dynamically the close images don't always display.
Moving the mouse over and off the x's location for an innactive tab will display.
When toggling between them the deactivated tabs will only display the x's.
The image area is still there, just can't be seen.

Any ideas?

jack.slocum
1 Dec 2006, 8:28 AM
Try a tabs.el.repaint(); after adding the tab. If that works I can add it to the base code.

vtswingkid
1 Dec 2006, 10:49 AM
I added the repaint. No apparent improvement. Here is a partial code snippet.
Clicking a menunode opens a tab if it doesn't already exists otherwise it sets it to active.



Net.prototype = {
initialize: function(ast){
var n = new YAHOO.widget.MenuNode("Network Setup", main.tree.getRoot());
var w = new YAHOO.widget.MenuNode("Web Server", n);
w.onLabelClick=this.webClick;
if(ast){
var a = new YAHOO.widget.MenuNode("Asterisk", n);
a.onLabelClick=this.astClick;
}
},
webClick: function(){
var e=document.getElementById('NetWebId');
if(e){
main.layout.showPanel('NetWebId');
return;
}
main.layout.beginUpdate();
main.layout.add('center', new YAHOO.ext.ContentPanel('NetWebId', {
autoCreate: true,
closable: true,
title: "Web Server"
}));
main.layout.endUpdate();
main.layout.getRegion('center').getTabs().el.repaint();
},
astClick: function(){
var e=document.getElementById('NetAstId');
if(e){
main.layout.showPanel('NetAstId');
return;
}
main.layout.beginUpdate();
main.layout.add('center', new YAHOO.ext.ContentPanel('NetAstId', {
autoCreate: true,
closable: true,
title: "Asterisk"
}));
main.layout.endUpdate();
main.layout.getRegion('center').getTabs().el.repaint();
}
}

jack.slocum
1 Dec 2006, 11:36 AM
Next thing to try :)

Try removing the beginUpdate/endUpdate calls. For a single add, they aren't needed. I doubt it will make a difference but anything is worth a shot.