PDA

View Full Version : ProgressBar problem in Collapsed Panel



antonio.giotto
22 Apr 2010, 5:37 AM
I've some problems in rendering a ProgressBar inside a collapsed Panel.
ProgressBar is rendered with height: 0px and width: 0px.

I've seen that if i put a collapse on afterrender the progressbar will show correctly, however the effect of collapsing panel is shown and i prefer to have a panel already collapsed instead.
I've also tried to insert a forceLayout: true configuration option in form, but seems it doesn't work.

Following the code:


Ext.onReady(function(){
[...]
// create the Grid
p_mailboxes = new Ext.FormPanel({
id: 'mailbox-form',
labelAlign: 'right',
title: 'Gestione E-mail',
width: 650,
style: 'margin-top: 5px;',
layout: 'column',
animCollapse: true,
hideCollapseTool: true,
collapsed: true,
disabled: true,
renderTo: 'mail_panel',
items: [{
columnWidth: 0.60,
layout: 'fit',
border: false,
style: 'margin: 5px;',
items: {
xtype: 'grid',
id: 'mailboxes-grid',
store: ds_mailboxes,
height: 250,
sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
columns: [
{id: 'email',header: 'Nome', sortable: true, dataIndex: 'name'},
{header: 'Dimensione', width: 70, sortable: true, dataIndex: 'dim'}
],
bbar: [{
xtype: 'button',
id: 'new',
text: 'Nuovo'
},{
xtype: 'button',
id: 'del',
text: 'Elimina'
}],
stripeRows: true,
autoExpandColumn: 'email',
listeners: {
viewready: function(g) {
g.getSelectionModel().selectRow(0);
}
}
}
},{
columnWidth: 0.40,
xtype: 'fieldset',
id: 'details',
layout: 'form',
labelWidth: 70,
height: 230,
title: 'Dettagli',
style: 'margin: 5px; height: 250px;',
bodyStyle: 'margin: 5px 0px;',
defaults : {width: 150, border: false},
defaultType: 'textfield',
border: true,
items: [{
fieldLabel: 'Name',
name: 'mname'
},{
fieldLabel: 'Spazio',
name: 'mdim'
},{
xtype: 'progress',
id: 'usage',
fieldLabel: 'Utilizzato',
name: 'usage',
text: '0%'
},{
xtype: 'checkbox',
fieldLabel: 'Altro',
style: 'margin-top: 3px'
},{
xtype: 'fieldset',
title: 'Configura altro',
collapsible: true,
collapsed: true,
hidden: true,
defaults: { width: 130, border: false },
defaultType: 'textfield',
items: [{
fieldLabel: 'Descrizione',
name: 'descr'
}]
},{
xtype: 'fieldset',
title: 'Modifica password',
collapsible: true,
collapsed: true,
defaults: { width: 130, border: false},
defaultType: 'textfield',
width: 240,
items: [{
fieldLabel: 'Password',
name: 'password',
},{
fieldLabel: 'Conferma',
name: 'confirm'
}]
}]
}],
listeners: {
enable: function(p){
[..]
p.expand();
},
disable: function(p){
p.collapse();
}
}
});


Any help will be appreciated. :D

antonio.giotto
22 Apr 2010, 8:25 AM
!up

antonio.giotto
22 Apr 2010, 3:45 PM
pls there is someone that knows how to solve this issue???? what is wrong in the code?