PDA

View Full Version : How to make Ext.Msg scrollable?



kedavra
26 Mar 2014, 12:47 PM
Hi,

Does anybody know how to make Ext.Msg scrollable? Here is an example of my code:

Ext.Msg.show({
title:'Save Changes?',
msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?<br\>' +
'Test<br\>Test<br\>Test<br\>Test<br\>Test<br\>Test<br\>Test<br\>Test<br\>Test<br\>' +
'Test 2<br\>Test 2<br\>Test 2<br\>Test 2<br\>Test 2<br\>Test 2<br\>Test 2<br\>Test 2<br\>',
buttons: Ext.Msg.YESNOCANCEL,
overflowY: 'scroll',
height: 200,
width: 200,
icon: Ext.Msg.QUESTION
});

'overflowY' or 'autoScroll' params do not work.

firefoxSafari
26 Mar 2014, 1:57 PM
I'm not sure if there's a great way using config options to do this. Your best option might be to put a custom css class on it and use css to drill down directly to the node you want scrollable. Something like


<style>
.myWindowCls .x-window-body > .x-box-inner {
overflow: scroll;
}
</style>


4i7

kedavra
27 Mar 2014, 4:16 AM
firefoxSafari, Thanks, I also was able to do it like this:
.x-window .x-window-body > .x-box-inner { overflow-y: auto !important; } The problem, that I need this for a specific window, not for all.

I will investigate, if it is possible to assign at least a CSS class for my window.

firefoxSafari
27 Mar 2014, 4:26 AM
My example should only apply the style to a specific window. It passes myWindowCls as the config option for cls in the call to show. You'd only do this on the message box you wanted the scrollable css applied to. Since the css uses this class in the scoping, other windows etc should not be affected.