Results 1 to 5 of 5

Thread: a Bug in a MessageBox?

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    39
    Answers
    1
    Vote Rating
    0
      0  

    Default a Bug in a MessageBox?

    Hi,

    I'm trying to show a pretty long text in a messageBox. Because it won't fit on the screen - I'm using 'scrollable' config with 'vertical'.

    The problem is that when I use 'scrollable' with ANY value - it won't show the message part, but only the title.

    Example:

    Code:
    Ext.Msg.show({
                        title: 'my title',
                        message: '<div style="text-align:left">' + myMessage + '</div>',
                        maxHeight: '80%',
                        scrollable: 'auto'
                    });
    If I remove the scrollable - it shows just fine, but exceeds the screen and thus doesn't show all the message.
    If I do use it - then it will show only the title.

    Ideas what's wrong?

    Thanks


  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    Check the CSS, making something scrollable adds DOM elements and CSS.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    39
    Answers
    1
    Vote Rating
    0
      0  

    Default can't see the problem

    Hi,
    So I've used Firebug to try and find the problem.
    I can see that when I use scrollable all the messagebox text (the message part) goes into a div with a class - 'x-scroll-container' - and then it all looks just as before. So I guess there is some problem with that one.

    I've removed ALL my css - and still the same problem.

    What could that be?

    Thanks!


  4. #4
    Sencha User
    Join Date
    Jan 2013
    Posts
    2
    Vote Rating
    0
      0  

    Default Same problem with me

    me too.

  5. #5
    Sencha Premium Member
    Join Date
    Jan 2012
    Location
    London, UK
    Posts
    587
    Answers
    25
    Vote Rating
    88
      1  

    Default

    Try using height rather than maxHeight perhaps? In my experience as soon as you set a scrollable, Sencha Touch will make the element as small as possible - because it thinks the user can at least scroll through it. Unfortunately this sometimes results in elements of 0px height! maxHeight won't be making a difference - you'd need minHeight or height to force it to be at least a certain height.

Posting Permissions

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