- Ext JS 3.0 Cookbook
- Jorge Ramon
- 198字
- 2021-04-01 13:43:48
Taking all the browser window's real estate
There are times when you want a component to automatically expand and fill its container. In the following screenshot, you'll see how a panel can be made to take up the whole browser window using a FitLayout
layout manager:

How to do it...
- Create the panel that will take all of its container's area:
greedyPanel={ title: 'Fit Layout', html: 'Panel using FitLayout' }
- The container is the one that lets its children fill the area:
var container=new Ext.Viewport({ layout: 'fit', defaults: { bodyStyle: 'padding:10px' }, items: [ greedyPanel ] });
Note the use of the layout:'fit'
configuration option. FitLayout
automatically expands the panel to fill its container, the Ext.ViewPort
instance. The Viewport
renders itself to the document body and automatically resizes itself to the size of the browser's viewport.
When using fit layouts, you should be aware that if the container has multiple panels, only the first one will be displayed. Also, the Viewport
class does not provide scrolling. If child panels within the Viewport
need scrolling, it should be enabled with the autoScroll
configuration option. There may only be one Viewport
created in a page.
- VMware虛擬化與云計(jì)算:vSphere運(yùn)維卷
- Solid Works 2021產(chǎn)品設(shè)計(jì)標(biāo)準(zhǔn)教程
- Python Text Processing with NLTK 2.0 Cookbook: LITE
- Alice 3 Cookbook
- Stable Diffusion圖像與視頻生成入門(mén)教程
- SOA Patterns with BizTalk Server 2009
- Photoshop+AE UI動(dòng)效設(shè)計(jì)從新手到高手
- 短視頻剪輯基礎(chǔ)與實(shí)戰(zhàn)應(yīng)用(剪映電腦版)
- iOS智能手機(jī)APP界面設(shè)計(jì)實(shí)戰(zhàn)教程
- 數(shù)碼攝影修圖師完全手冊(cè)(第2卷)
- Photoshop+CorelDRAW平面設(shè)計(jì)實(shí)例教程(第3版)
- Moodle 2.0 for Business Beginner's Guide
- CorelDRAW 2018平面設(shè)計(jì)基礎(chǔ)教程(第3版)
- SOLIDWORKS 2023中文版機(jī)械設(shè)計(jì)從入門(mén)到精通
- Excel 2016 VBA入門(mén)與應(yīng)用