1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    17
    Vote Rating
    -2
    Answers
    2
    kedavra has a little shameless behaviour in the past

      0  

    Default Unanswered: Cannot set dynamical height and 'scrollable' in ST 2.2 (works in ST 2.0.1)

    Unanswered: Cannot set dynamical height and 'scrollable' in ST 2.2 (works in ST 2.0.1)


    After upgrading to ST 2.2, my layout was partly broke. It appears, that I cannot set dynamical height, like layout: 'fit' and scrollable: 'vertical'.
    I always get the error "This container is set to scrollable: false but has no specified height. You may need to set the container to scrollable: null or provide a height." and my content is not being shown, but is present in DOM. Here is an example of my code:
    Code:
    Ext.define('DisplayPanel', {
      extend: 'Ext.Container',
      config: {
        border: false,
        layout: 'fit',
        items: [{
            // ... other items here
        },
        {
          xtype: 'container',
          id: 'problem_container',
          border: false,
          layout: 'fit',
          scrollable: 'vertical',
          html: '...Lots of HTML content here...'
        }]
      }
    });
    I am sure, that the problem is in 'height' (0px) applied to my container. But I do _not_ need static height.

    Please, also note that I do not need to have parent container to be scrolled, as other items should be always on their place.

  2. #2
    Sencha Premium Member
    Join Date
    Jan 2011
    Posts
    40
    Vote Rating
    1
    OhmzTech is on a distinguished road

      0  

    Default


    What are the other items you are putting under layout fit? I assume these are docked items. Try setting the inner scrollable panel to height 100%.

  3. #3
    Sencha User
    Join Date
    May 2012
    Posts
    17
    Vote Rating
    -2
    Answers
    2
    kedavra has a little shameless behaviour in the past

      0  

    Default


    You are almost right. Other items (buttons) are not docked, but have absolute position with the parameter 'top'. Avoiding your further suggestions regarding it, I do not want to use toolbar there, as I need context appear between them (buttons).
    I actually did tried to set 'height' to '100%' => nothing. I even used combinations with and without 'layout': 'fit'.

    The content appears only when I set 'height' to static value or remove 'scrollable' for 'problem_container'.

  4. #4
    Sencha User
    Join Date
    Aug 2010
    Posts
    13
    Vote Rating
    0
    tim.o is on a distinguished road

      0  

    Default


    I've nearly the same problem ...

  5. #5
    Sencha User
    Join Date
    May 2012
    Posts
    17
    Vote Rating
    -2
    Answers
    2
    kedavra has a little shameless behaviour in the past

      0  

    Default


    UP, please.

  6. #6
    Sencha User
    Join Date
    May 2012
    Posts
    17
    Vote Rating
    -2
    Answers
    2
    kedavra has a little shameless behaviour in the past

      0  

    Default


    UP, please!

Thread Participants: 2

Tags for this Thread