zoukankan      html  css  js  c++  java
  • EXT扩展实例:在FieldSet上添加一个关闭按钮

    开发环境 ExtJS 4.07

    Ext.onReady(function () {
            Ext.define('Ext.form.ClosableFieldSet', {
                extend: 'Ext.form.FieldSet',
                alias: 'widget.closablefieldset',
           //覆盖父类的方法 initLegend:
    function () { var me = this; me.callParent(arguments); if (!me.legend.closable) { me.legend.insert(1, Ext.widget('tool', { type: 'close', handler: me.onCloseClick, scope: me })); me.legend.closable = true; } }, onCloseClick: function () { if (this.ownerCt) { this.ownerCt.remove(this, true); } } }); Ext.create('Ext.form.Panel', { title: 'Closable FieldSet', bodyPadding: 10, 550, renderTo:Ext.getBody(), items: [ { xtype: 'closablefieldset', columnWidth: 0.5, title: '测试', collapsible: true, defaultType: 'textfield', defaults: { anchor: '100%' }, layout: 'anchor', items: [ { fieldLabel: 'Field 1', name: 'field1' }, { fieldLabel: 'Field 2', name: 'field2' } ] } ] }); });
  • 相关阅读:
    Pyton项目打包成exe文件
    App数据指标
    电商基础指标体系
    Matplotlib复杂作图
    Sklearn之聚类分析
    Seaborn可视化
    Matplotlib可视化2
    Matplotlib可视化1
    Pandas可视化
    Linux常用指令(3)
  • 原文地址:https://www.cnblogs.com/zdkjob/p/2482186.html
Copyright © 2011-2022 走看看