Results 1 to 2 of 2

Thread: Non-scrollable list inside scrolling container

  1. #1
    Sencha User ThiemNguyen's Avatar
    Join Date
    Jul 2011
    Hanoi, Vietnam
    Vote Rating

    Default Non-scrollable list inside scrolling container

    Hi everyone,

    I have read many related posts but not found any good answers yet although I know it's not a new question.

    I would like to create a container which is scrollable and has a list and other components such as buttons or textfields which are arranged vertically. I don't want the list to be scrollable, it should just show all items.

    I've been reading many posts and found some workarounds but they are not nice enough, for example I don't want to create a vbox with fixed flex config because it creates unnecessary spaces and also doesn't work with my idea that the list should not be scrollable itself. Or also setting directionLock on the list itself is not better, either, because it won't go across and hide other components as we scroll the outer container.

    Is there any idea please?

    ?Your time is limited, so don't waste it living someone else's life.

  2. #2
    Sencha User
    Join Date
    Feb 2011
    Düsseldorf, Germany
    Vote Rating


    How about setting a value to list's itemHeight and then calc the height you need like this:
    initialize: function() {
        var itemHeight = this.getItemHeight();
        var numberOfData = Ext.getStore('myDataStore').getData().getCount();
        var list = Ext.Viewport.down('.list[itemId=myList]');
        list.setHeight(numberOfData * itemHeight;);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts