PDA

View Full Version : why is my list not scrolling?



headkit
31 May 2011, 11:59 PM
hi there!

the following code seems to be incomplete or I am doing something wrong? problem is that the list doesn't scroll right.


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,
}]
});

}
});

thanx for having a look!

theyang
1 Jun 2011, 2:01 AM
The list scrolls fine when it is a direct child of a container. Try putting topPanel and MyList inside a container with a layout:vbox.

headkit
1 Jun 2011, 2:02 AM
great! thanx!