PDA

View Full Version : how to change scrollable direction?



nukboon
17 Jan 2011, 12:39 PM
//my code is not work!
//this code work in first time but when it execute by "orientationChange" or "afterlayout" event it not work


listeners: {
afterlayout: function(c){
var portrait = Ext.getOrientation() == "portrait";
c.setScrollable( portrait ? 'vertical' : 'horizontal' );
},

//note i want to change scroll direction of panel when orientation change
someone have any solution

Hertz
10 Mar 2011, 4:39 PM
I've been looking on the forums for a solution for this but I haven't found anything.

Is there a way to change a scroller's direction?.

tonin10
11 Mar 2011, 4:53 AM
i'm not sure but perharps it' s your listener not good
try this one :


listeners: {
orientationchange : function(){}
}