Hybrid View

  1. #1
    Sencha User biggbest's Avatar
    Join Date
    Jun 2011
    Location
    France
    Posts
    33
    Answers
    1
    Vote Rating
    5
    biggbest is on a distinguished road

      0  

    Default Answered: Container on top of a list

    Answered: Container on top of a list


    Hi !

    I'm using Sencha Architect and have just upgraded to ST 2.1.

    What I want to do
    Inside a fullscreen Panel, I want to add 2 containers on the top of a list and have the whole parent Panel vertically scrollable.

    In ST 2.0.1 I managed to get this behavior by turning the list scrollable attribute to false and made the parent panel vertically scrollable.
    It doesn't work anymore in ST 2.1 :-(

    Is there a way to get this layout working ?

    mockup.png
    Attached Images

  2. Code:
    Ext.create('Ext.List', {
        fullscreen: true,
        itemTpl: '{title}',
        items:[{
            xtype:'container',
            scrollDock:'top',
            height:50,
            html:'another container'
        },{
            xtype:'container',
            scrollDock:'top',
            height:100,
            html:'a container'
        }],
        data: [
            { title: 'Item 1' },
            { title: 'Item 2' },
            { title: 'Item 3' },
            { title: 'Item 4' }
        ]
    });

  3. #2
    Sencha User biggbest's Avatar
    Join Date
    Jun 2011
    Location
    France
    Posts
    33
    Answers
    1
    Vote Rating
    5
    biggbest is on a distinguished road

      0  

    Default


    It looks like something's going wrong with the scrollable property of Ext.List and Ext.Dataview since the 2.1 in Architect, it's set to false by default, was true before the 2.1, and it often doesn't take effect when changing it, like if Architect doesn't see that I changed it.

  4. #3
    Sencha User
    Join Date
    Apr 2010
    Location
    China
    Posts
    227
    Answers
    64
    Vote Rating
    20
    haduki will become famous soon enough haduki will become famous soon enough

      0  

    Default


    Code:
    Ext.create('Ext.List', {
        fullscreen: true,
        itemTpl: '{title}',
        items:[{
            xtype:'container',
            scrollDock:'top',
            height:50,
            html:'another container'
        },{
            xtype:'container',
            scrollDock:'top',
            height:100,
            html:'a container'
        }],
        data: [
            { title: 'Item 1' },
            { title: 'Item 2' },
            { title: 'Item 3' },
            { title: 'Item 4' }
        ]
    });
    I write English by translator.

  5. #4
    Sencha User biggbest's Avatar
    Join Date
    Jun 2011
    Location
    France
    Posts
    33
    Answers
    1
    Vote Rating
    5
    biggbest is on a distinguished road

      0  

    Default


    Hum, it looks like there is no way to add container to an Ext.List in Architect, am I wrong ?

    Edit: I just tried adding items property to the list, and it works well :-o
    I have 2 questions, first one, where did you found the scrollDock property ? Second one, what this property change ? I tried without, it looks the same.

    But thank you, it really works as I what it to be

    Edit2: I was trying scrollDock on a Dataview... It make a difference on List, perfect. Still have those two questions :
    - Where is the scrollDock doc ?
    - Why use a Dataview instead of a List ?

  6. #5
    Sencha User
    Join Date
    Apr 2010
    Location
    China
    Posts
    227
    Answers
    64
    Vote Rating
    20
    haduki will become famous soon enough haduki will become famous soon enough

      0  

    Default


    'scrollDock' only works for Ext.dataview.List, the default value is 'top'. you can try 'bottom' to find the difference.

    'Ext.dataview.DataView' extends from 'Ext.Container'. You can add items like container but the items always on the top.

    Everything on the source file.
    I write English by translator.

  7. #6
    Sencha User biggbest's Avatar
    Join Date
    Jun 2011
    Location
    France
    Posts
    33
    Answers
    1
    Vote Rating
    5
    biggbest is on a distinguished road

      0  

    Default


    Amazing, it's working, so, thank you. But I just don't find scrollDock in the api, maybe I'm blind, or, as often, some elements are missing in the doc api :-(

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar