PDA

View Full Version : Toolbar's background missing in ContentPanel



chen4w
1 Jun 2007, 1:40 AM
It work well in firefox, but in IE6 toolbar background missing,
it appears when the layout contains more than one ContentPanel.

I used the example ext\examples\layout\complex.html
just add a toolbar in a ContentPanel.
code:
var simpleToolbar = new Ext.Toolbar('tb_div');
simpleToolbar.addButton({
text: 'Scroll Bottom', cls: 'x-btn-text-icon', handler: function(o, e) {
}
});
...
layout.add('center', new Ext.ContentPanel('center1', {title: 'Close Me', closable: true, toolbar: simpleToolbar}));

chen4w
1 Jun 2007, 6:59 PM
the code with bug under IE6:
<div id="tb_div"></div>

turn to
<div id="tb_div" class='x-toolbar'></div>

or by js
if(Ext.isIE)
Ext.get('tb_div').addClass('x-toolbar');

tryanDLS
2 Jun 2007, 11:53 AM
Not sure why this happens in IE6 - I don't have a debugger to see if the generated HTML is different in IE vs FF. The solution is to put a width on the toolbar div.