PDA

View Full Version : tabpanel question about configuration.



re.tf
15 Aug 2013, 6:35 AM
Hi All,

I have 3 questions about tabpanel.

First my code:



// ...
items: [{
region: 'center',
xtype: 'tabpanel',
items:[{
rtl: false,
title: '[str-err]',
bodyStyle: {
color: '#0f0',
background: '#000',
padding: '10px'
},
loader: {
url: 'myurl',
contentType: 'txt',
loadMask: true,
},
listeners:
{
activate:
function(tab){ tab.loader.load(); }
}
},
// ...


This code produce a window, like this:
45376

1 Question: How to fill all tab area with black color, not only a line? This is a css problem?



bodyStyle: {
color: '#0f0',
background: '#000',
padding: '10px'
}


The 'background' don't should paint all area?

45377

2 Question: In loade I get one txt file, see:




loader: {contentType: 'txt',},


The problem here, is that my txt file use '\n' to new line! Here (I think) it need be <br>! Have any way to this control understand '\n', or convert on the fly '\n' to <br>.

3 Question: How to put a scroll on tab?

Thanks for help!

scottmartin
15 Aug 2013, 8:06 AM
For the tabpanel issues:



Ext.require('*');

Ext.onReady(function() {

Ext.create('Ext.tab.Panel', {
width: 400,
height: 400,

autoScroll: true,

renderTo: document.body,
items: [{
title: 'Foo',

// paint body of panel
bodyStyle: {
color: '#0f0',
background: '#000',
padding: '10px'
}
}, {
title: 'Foo-bar1',
}, {
title: 'Foo-bar2',
}, {
title: 'Foo-bar3',
}, {
title: 'Bar',
tabConfig: {
title: 'Custom Title that is very long',
tooltip: 'A button tooltip'
}
}]
});

});


Scott.