PDA

View Full Version : EXTJS 4 Window



Bokara
16 Oct 2011, 1:48 PM
Hi,

is it possible to make window see through in extjs 4?
If yes, how?

Thanks!

skirtle
16 Oct 2011, 3:07 PM
Try:


win.getEl().setOpacity(0.5);

You'll need to put it after the window is rendered, which normally happens when you call show(). You could maybe do it in an afterrender listener.

Bokara
16 Oct 2011, 10:56 PM
Exactly what i was looking for.
Thanks!

:D:D:D

mitchellsimoens
17 Oct 2011, 7:01 AM
For maintainability, I would rather do this in CSS.

skirtle
17 Oct 2011, 7:45 AM
You're probably right, depends on the circumstances. For reference, I think the CSS way would be a bit like this:


Ext.create('Ext.window.Window', {
cls: 'trans',
...
});


.trans {
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity = 50);
opacity: 0.5;
}

Haven't tested it but I reckon that should work.