-
7 Nov 2012 7:09 AM #1
list scrollable=false doesn't work
list scrollable=false doesn't work
[edit]
the problem seems to be a list is always scrollable, even if scrollable is set to false on the list (!), therefore the list does not get a height depending on its items.
Is there a workaround for this behaviour?
[/edit]
Hi,
In my Sencha Touch 2.0 app, I had a view with the following structure:
Both containers and the list had a layout = default. This allowed the user to scroll the entire view, the top image and list would scroll.Code:- container (scrollable = vertical) - container (fixed height, contains image in html) - list (scrollable = false, has dynamic height depending on amount of items)
Since I upgraded my project to Touch 2.1, this approach doesn't seem to work any more. Only the image in the container is shown, the container seems to have gotten the same height as it's parent (the top container). The list has got a height of zero (used to be; as high as needed to display all items).
Question:
what structure do I need to set up to be able to scroll both the image and the list at the same time?
-
8 Nov 2012 12:45 PM #2
If I understand your question properly, the solution in Touch 2.1 is to add a component as an item of the list. Then attach it to the bottom or the top of the of the list by utilizing a config called scrollDock (currently undocumented).
You should be able to do something like this:
That said, you cannot currently add children to a list in Architect. I believe that is due to be changed in the next release.Code:Ext.create('Ext.dataview.List', { store : store, itemTpl : '{field1}', items : [ { xtype : 'textfield', label : 'TestField', placeHolder : 'Enter the field value', scrollDock : 'top', docked : 'top' }, { xtype : 'fieldset', title : 'Test Area', margin : '0 2em', scrollDock : 'bottom', docked : 'bottom', items : [ { xtype : 'textfield', label : 'Test', placeHolder : 'Enter test value' } ] } ] });
-
9 Nov 2012 3:26 AM #3
I solved the problem by converting my list into a dataview. Works for now. Thanks for taking the time to respond.
-
9 Nov 2012 11:41 AM #4
That's wonderful news! Thanks for the update.


Reply With Quote