View Full Version : Orientation Change

26 Jul 2010, 8:15 AM
I have noticed that a list I have contained in a tab panel is acting weird when the orientation changes. I can see that I can watch for orientation but is there a way to "refresh" the layout? In other words to redraw the screen given the screen properties?

// how do I refresh

26 Jul 2010, 9:00 AM
I have a system in my project which does an onload and onorientationchange which alters the css. I am not sure if it refreshes the content or not, but it may be similar to what you are looking for.

26 Jul 2010, 9:07 AM
I don't think I need to change any css, the component just needs to be redrawn

26 Jul 2010, 4:16 PM
monitorOrientation defaults to false for panel and it's subclasses, I'm not really sure what the reasoning behind that is, I'll have to check. Set it to true in the config.

27 Jul 2010, 5:54 AM
panels have a setOrientation method which takes the orienation, width, and height. If you set that and then call doLayout on your container panel you should be ok.