[ExtJS5 Study Notes] section 18th of the EXTJS5 Panel dockeditems Property Configuration toolbar

Source: Internet
Author: User

This address: http://blog.csdn.net/sushengmiyan/article/details/39156321

Official Example: Http://docs.sencha.com/extjs/5.0/apidocs/#!/api/Ext.panel.Panel-cfg-dockedItems

This article Sushengmiyan

--------------------------------------------------------------------------------------------------------------- ---------------------

Like Word Office software, we need to put some buttons on top of our office area, sometimes we need to be bound together with the panel, this time, in the panel to set a docking component toolbar can be implemented. Modify Main.js

On the panel component in the Student list, add the following:

              Dockeditems: [           {        xtype: ' toolbar ',        items: [{                          //xtype: ' Gridtoolbar ',//button toolbar                              text: ' New ',                               glyph:0xf016                            },{                              text: ' Modify ',                              glyph:0xf044                          },{                              text: ' Delete ',                              glyph:0xf014                          },{< C14/>text: ' View ',                              glyph:0xf022                          }],                dock: ' Top ',  

The display results are as follows:

To facilitate later maintenance, we extracted the newly added docking contents into a class, as follows:

/**  * Extracts a class of docked components for easy maintenance *  /ext.define (' OaSystem.view.main.region.GridToolbar ', {              extend: ' Ext.toolbar.Toolbar ',              alias: ' Widget.gridtoolbar ',              initcomponent:function () {                  This.items = [{                              text : ' New ',                               glyph:0xf016,                            },{                              text: ' Modify ',                              glyph:0xf044                          },{                              text: ' Delete ',                              glyph:0xf014
   },{                              text: ' View ',                              glyph:0xf022                          }];                  This.callparent ();              }  });  
Introduce this file in Main.js:

Later want to modify these content, go directly to main under the folder under the region Gridtoolbar.js file on it.

[ExtJS5 Study Notes] section 18th of the EXTJS5 Panel dockeditems Property Configuration toolbar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.