PDA

View Full Version : Setting Panel to fullscreen on orientationchange



momesana
4 Nov 2010, 1:29 PM
Hi,
I want a Panel that is nested within a set of outer panels to become fullscreen once the orientation changes to landscape. Upon switching back to portrait mode I want it to return to normal mode again (i.e. not being fullscreen). I tried the following inside the class definition but it doesn't work allthough this function is being invoked:



...
onRender: function () {
RelevantToMeWidget.superclass.onRender.apply(this, arguments);
this.on('orientationchange', function(cnt, orient, w, h) {
console.log('orientation changed:' + w + 'x' + h);
cnt.fullscreen = (w > h);
console.dir(cnt.fullscreen);
}, this);
},
...


Is it possible to change the fullscreen property at all after the creation of a container or do I have to implement the required functionality in another way?

Thanks in advance

christythomas
3 Feb 2011, 8:09 AM
Where you able to accomplish this? I am looking to do the same thing.