Hide ExtJS Panel Title

后端 未结 3 1879
被撕碎了的回忆
被撕碎了的回忆 2021-01-11 10:31

I have a ExtJS panel inside a viewport center region. I want to hide the title of the panel. How can I do it? I\'m using xtype config for declaring the panel.

相关标签:
3条回答
  • 2021-01-11 11:02

    Use preventHeader property. I checked it and it's worked

    See example below

    Ext.widget('panel', {
            title: 'Panel header will not be shown',
            preventHeader: true,
            width: 300
    
        });
    
    0 讨论(0)
  • 2021-01-11 11:14

    You can just use the config

    Ext.panel.Panel({
        // title: 'Test',   to neglet this
        header:false,
        tools: [{
            type: 'refresh'
        }, {
            type: 'help'
        }],
    });
    

    "header:false config documentation"

    0 讨论(0)
  • 2021-01-11 11:19

    Use either the header or headerAsText config option of panel to hide its title. From ExtJS API documentation:

    header : Boolean

    true to create the Panel's header element explicitly, false to skip creating it. If a title is set the header will be created automatically, otherwise it will not. If a title is set but header is explicitly set to false, the header will not be rendered.

    and

    headerAsText : Boolean

    true to display the panel title in the header, false to hide it (defaults to true).

    0 讨论(0)
提交回复
热议问题