JSFiddle - React, Tailwind, and code Playground
by YangHax
HTML
<link rel="stylesheet" href="http://cdn.sencha.io/ext-4.1.0-gpl/resources/css/ext-all.css">
<html>
<head>
<title>ExtJS4 Test</title>
</head>
<body>
</body>
</html>
JavaScript
// removeDocked() (ExtJS 4.1)
//**************************//
Ext.onReady(function(){
var w = Ext.create('Ext.Window',{
title: 'removeDocked() (ExtJS 4.1)'
, width: 300
, height: 200
, layout: 'fit'
, items: [{
xtype: 'tabpanel',
items: [
{ title: 'test', html: 'aa', id: 'dockParent' }
]
}]
});
var dockParent = Ext.getCmp('dockParent');
dockParent.addDocked({
xtype: 'toolbar',
name: 'controls',
dock: 'left',
layout: { type: 'vbox' },
defaults: { margin: 2, textAlign: 'left' },
items:
[
'<b>Controls</b>',
{
xtype: 'button',
text: 'Remove Docked',
handler: removeDocked
}
]
});
w.show();
});
function removeDocked()
{
var dockParent = Ext.getCmp('dockParent');
var toolbar = dockParent.down('toolbar');
dockParent.removeDocked(toolbar,true);
}