Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to create a modal window which only masks a particular component in ExtJs 4?
    primarykey
    data
    text
    <p>I would like to create a modal window which will only mask the center region of my application.<br> How can I achieve this?</p> <p>In ExtJs 3 I was able to use the windows <code>renderTo</code> property and render the window to the center region. So that when the window was shown only the center region was masked.</p> <p>However if I use the <code>renderTo</code> property in ExtJs 4 the whole document.body is masked. And in IE the whole the window is also masked.</p> <p>Below is the border layout example from the Ext Examples. with a modal window in the center region. ( the whole body gets masked when shown) </p> <pre><code> Ext.onReady(function() { var cw; Ext.create('Ext.Viewport', { layout: { type: 'border', padding: 5 }, defaults: { split: true }, items: [{ region: 'north', collapsible: true, title: 'North', split: true, height: 100, html: 'north' },{ region: 'west', collapsible: true, title: 'Starts at width 30%', split: true, width: '30%', html: 'west&lt;br&gt;I am floatable' },{ region: 'center', layout: 'border', border: false, items: [{ region: 'center', html: 'center center', title: 'Center', items: [cw = Ext.create('Ext.Window', { xtype: 'window', closable: false, minimizable: true, title: 'Constrained Window', height: 200, modal: true, //MODAL WINDOW, MASKS THE WHOLE DOCUMENT BODY? width: 400, constrain: true, html: 'I am in a Container', itemId: 'center-window', minimize: function() { this.floatParent.down('button#toggleCw').toggle(); } })], dockedItems: [{ xtype: 'toolbar', dock: 'bottom', items: ['Text followed by a spacer', ' ', { itemId: 'toggleCw', text: 'Constrained Window', enableToggle: true, toggleHandler: function() { cw.setVisible(!cw.isVisible()); } }] }] },{ region: 'south', height: 100, split: true, collapsible: true, title: 'Splitter above me', html: 'center south' }] },{ region: 'east', collapsible: true, floatable: true, split: true, width: 200, title: 'East', layout: { type: 'vbox', padding: 5, align: 'stretch' }, items: [{ xtype: 'textfield', fieldLabel: 'Text field' }, { xtype: 'component', html: 'I am floatable' }] },{ region: 'south', collapsible: true, split: true, height: 200, title: 'South', layout: { type: 'border', padding: 5 }, items: [{ title: 'South Central', region: 'center', html: 'South Central' }, { title: 'South Eastern', region: 'east', flex: 1, html: 'South Eastern', split: true, collapsible: true }, { title: 'South Western', region: 'west', flex: 1, html: 'South Western&lt;br&gt;I collapse to nothing', split: true, collapsible: true, collapseMode: 'mini' }] }] }); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload