JSFiddle - React, Tailwind, and code Playground

by YangHax

HTML

<link rel="stylesheet" href="http://dev.sencha.com/deploy/ext-4.0.2a/resources/css/ext-all.css">
<html>
    <head>
        <title>ExtJS4 Test</title>
    </head>
    <body>
    </body>
</html>

JavaScript

// ExtJS4 Dynamic height when updating box html
//**************************//                        

Ext.onReady(function(){
    
    var text = 'long text ';
    for ( var i = 0; i < 4; i++ ) text += text;
    
    var win = Ext.create('Ext.Window',{
        title: 'Dynamic height'
        , autoScroll: true
        , width: 300
        , layout: 'anchor'
        , defaults: { anchor: '100%' }
        , items: [{
            xtype: 'box'
            , name: 'content'
            , html: text
        }]
        , buttons: [{
            text: 'More Text!'
            , handler: function() {
                text += text;
                win.down('box[name=content]').update(text);
                win.doLayout();
            }
        }]
    });
    win.show();
});