PDA

View Full Version : List inside Card Panel not scrolling all the way down



mindstuff
27 Dec 2010, 3:02 PM
I have a list as the activeItem of a panel (layout: 'card'). The list is longer than the window so it vertically scrolls but not all the way to the bottom.

Anyone know why or what config I can add to the list to make sure it scrolls to the bottom?

Thanks

mrsunshine
28 Dec 2010, 6:59 AM
pleas post some code that we can better help you,

should work with something like



{
layout: 'fit',
dockedItems: [
{
xtype: 'toolbar',
dock: 'top',
layout: 'fit',
title: 'Chat',
items: [
{
xtype: 'spacer'
},
{
iconMask: true,
ui: 'plain',
iconCls: 'settings',
itemId: 'settingsButton'
}
]
},
{
xtype: 'toolbar',
dock: 'bottom',
itemId: 'msgToolbar',
layout: 'fit',
items: [
{
xtype: 'textfield',
width: '96%'
}
]
}
],
items: [
{
xtype: 'list',
store: this.store,
scroll: 'vertical'
}
]

}

mindstuff
28 Dec 2010, 11:58 AM
Thanks...I was missing a layout: 'fit' on the parent panel... that is really strange but fixed the issue. Things really get weird in Sencha when you try to do too much nesting

headkit
27 May 2011, 12:33 AM
hm, my code has the same problem. where is my error here?




Ext.ns('simfla.ux.plugins.demo');

Ext.regModel('Contact', {
fields: ['firstName', 'lastName']
});

simfla.ux.plugins.demo.store = new Ext.data.Store({
model: 'Contact',
sorters: 'firstName',

data: [
{firstName: 'Tommy', lastName: 'Maintz'},
{firstName: 'Ed', lastName: 'Spencer'},
{firstName: 'Jamie', lastName: 'Avins'},
{firstName: 'Aaron', lastName: 'Conran'},
{firstName: 'Dave', lastName: 'Kaneda'},
{firstName: 'Michael', lastName: 'Mullany'},
{firstName: 'Abraham', lastName: 'Elias'},
{firstName: 'Tommy', lastName: 'Maintz'},
{firstName: 'Ed', lastName: 'Spencer'},
{firstName: 'Jamie', lastName: 'Avins'},
{firstName: 'Aaron', lastName: 'Conran'},
{firstName: 'Dave', lastName: 'Kaneda'},
{firstName: 'Michael', lastName: 'Mullany'},
{firstName: 'Abraham', lastName: 'Elias'},
{firstName: 'Tommy', lastName: 'Maintz'},
{firstName: 'Ed', lastName: 'Spencer'},
{firstName: 'Jamie', lastName: 'Avins'},
{firstName: 'Aaron', lastName: 'Conran'},
{firstName: 'Dave', lastName: 'Kaneda'},
{firstName: 'Michael', lastName: 'Mullany'},
{firstName: 'Abraham', lastName: 'Elias'},
{firstName: 'Tommy', lastName: 'Maintz'},
{firstName: 'Ed', lastName: 'Spencer'},
{firstName: 'Jamie', lastName: 'Avins'},
{firstName: 'Aaron', lastName: 'Conran'},
{firstName: 'Dave', lastName: 'Kaneda'},
{firstName: 'Michael', lastName: 'Mullany'},
{firstName: 'Abraham', lastName: 'Elias'},
{firstName: 'Jay', lastName: 'Robinson'}
]
})

Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: false,
onReady : function() {
var app = new Ext.Panel({
fullscreen: true,
layout: 'fit',
dockedItems:[{
xtype: 'toolbar',
title: 'EditableList Plugin',

}],
items: [
{
xtype: 'panel',
title:'topPanel',
items:{
xtype:'button',
cls: 'editChildBtn',
text: 'Einstellungen',
width: 150,
handler: function(){}
}
},
{
xtype: 'list',
style: 'background-color: Transparent;',
id: 'MyList',
allowDeselect: true,
clearSelectionOnDeactivate: true,
//layout: 'fit',
store: simfla.ux.plugins.demo.store,
itemTpl: '{firstName} <strong>{lastName}</strong>',
grouped: false,
indexBar: false,
singleSelect: true,
}]
});

}
});



thnx!

gori
9 Aug 2011, 9:31 PM
heardkit, try to add scroll property to your list and maybe layout fit to the panel before list:



Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: false,
onReady : function() {
var app = new Ext.Panel({
fullscreen: true,
layout: 'fit',
dockedItems:[{
xtype: 'toolbar',
title: 'EditableList Plugin',

}],
items: [
{
xtype: 'panel',
title:'topPanel',

layout: 'fit',

items:{
xtype:'button',
cls: 'editChildBtn',
text: 'Einstellungen',
width: 150,
handler: function(){}
}
},
{
xtype: 'list',
style: 'background-color: Transparent;',
id: 'MyList',
allowDeselect: true,
clearSelectionOnDeactivate: true,
//layout: 'fit',

scroll: 'vertical',

store: simfla.ux.plugins.demo.store,
itemTpl: '{firstName} <strong>{lastName}</strong>',
grouped: false,
indexBar: false,
singleSelect: true,
}]
});

}
});



that helps me a lot