PDA

View Full Version : Replace Viewport by Ext.panel.Panel



hieu79vn
23 Apr 2012, 11:02 PM
Hello,


I'm using Extjs in a user control in ASP.NET so i cannot use ViewPort. Can I replace the viewport in your example http://docs.sencha.com/ext-js/4-0/#!/guide/mvc_pt3 by an Ext.panel.panel? Can I use Controls:[], Models[] in Panel like in Viewport?


Thanks

friend
24 Apr 2012, 3:23 AM
A Viewport is not a requirement when designing an ExtJS application. You can use any container you like. The only reason a Viewport is used so heavily is that it automatically fills your browsers content area, so that you don't have to write manual resizing logic.

hieu79vn
24 Apr 2012, 6:16 AM
Thank you friend :)
And if you know in the sqme example, what does it means 'scope: this' ??

friend
24 Apr 2012, 9:06 AM
Here's a good overview article on "scope":

http://www.digital-web.com/articles/scope_in_javascript/