1. #1
    Ext JS Premium Member
    Join Date
    Nov 2009
    Posts
    230
    Vote Rating
    1
    chinabuffet is on a distinguished road

      0  

    Question Ext.Window without explicit width display issues in IE / chrome

    Ext.Window without explicit width display issues in IE / chrome


    Hello,

    I've tried searching for the answer to this problem but couldn't find anything, so maybe my search criteria was just off.

    The problem is that a simple Ext.Window without an explicit width renders the entire width of the page in IE with a goofy looking shadow, and sometimes chrome. I don't want to set a width directly on the window because I need to set the exact width of the window's body element... setting it on the window directly causes ~10px or so to be clipped because of the window's sides. The documentation says that the default width of the window is the browsers auto, so I'm not sure if I'm just missing a config option or what the deal is.

    This problem can be seen with this simple example:

    Code:
    Ext.onReady(function() {
      new Ext.Window({
        title: "dummy window",
        html: "i am a window"
      }).show();
    });
    thoughts/suggestions?

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Consider what the normal default width of an element in a browser would be. Would it be the width of the text? No, a display:block element would stretch to the right of the containing element (which for a window, which is initially rendered with position:absolute;left:-10000px, would be very wide!).

    MessageBox solves this by rendering the window initially with a fixed max. width and then calculate the required width (adding getFrameWidth('lr') of the containing elements).

  3. #3
    Ext JS Premium Member
    Join Date
    Nov 2009
    Posts
    230
    Vote Rating
    1
    chinabuffet is on a distinguished road

      0  

    Default


    Doh, thanks! That makes sense, I barely read the first few words of your first sentence and it kind of dawned on me. So now my question is this:

    Say I have a window with a body element that is sized to 500px wide. To properly set the width of the window, should I use the line below?

    Code:
    this.setWidth(500 + this.getFrameWidth());
    Thanks again!

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Code:
    this.setWidth(500 + this.getFrameWidth('lr'));
    (and mabye also + this.body.getFrameWidth('lr') - depending on what the body holds)

Similar Threads

  1. Chrome Issues
    By Jangla in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 12 Aug 2010, 3:04 PM
  2. Google Chrome UI Issues (v 2.2)
    By yenduttjain in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 10 Sep 2009, 1:00 AM
  3. Omitting width for Ext.Window in IE7 causes display problems (ext 3.0)
    By jacurry in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 20 Jul 2009, 7:13 AM
  4. Replies: 22
    Last Post: 3 Jun 2009, 6:01 PM

Thread Participants: 1

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