简体   繁体   中英

How to disable border line of Ext JS panel and Toolbar?

I'm try to hide a border line but can not be success about that! Here is a screenshot of mentioned border line.

As you will notice between 'Export Excel' and radiofield a vertical line is appear. Below you will find some code snippets which includes those elements. I've used a Toolbar and a panel to create those items. So tried several config such as border: false , frame: false , bodyBorder: false for each class but non of them be success to hide this line.

Thanks for advices.

return [
            {
                xtype: 'panel',
                scrollable: true,
                // border: false,
                // bodyBorder: false,
                // frame: false,
                layout: {type: 'hbox', align: 'middle', pack: 'start'},
                items: [
                    {
                        xtype: 'panel',
                        // border: false,
                        // bodyBorder: false,
                        items: me.listToolbar() //This is end of 'toolbar' class.
                    },
                    {
                        xtype: 'panel',
                        items: me.subModuleTb() //'radiofield' starts by here
                    }
                ]
            }
        ];

and here is that called ListToolbar class:

Ext.define('MyApp.ListToolbar', {
    extend: 'Ext.toolbar.Toolbar',
    alias: 'widget.listtoolbar',

    requires: [],

    dock: 'top',
    //border: 0, //This is not disappear the line as well
    //cls: 'list-toolbar //Defined 'border' as zero on all.scss for this cls but did not worked as well!
    layout: {
        type: 'table',
        tdAttrs: { style: 'padding: 5px 10px;' }
    },
    defaults: {
        enableToggle: true
    },
    scope:this,
    items: [

What is the version you are using? I hope this border appears in the toolbar. You can use "border": 0 property in the toolbar. or you can control in the CSS by adding "Cls" property.

Ext.create('Ext.toolbar.Toolbar', {
renderTo: document.body,
**border:0,**
width   : 500,
items: [
    {
        // xtype: 'button', // default for Toolbars
        text: 'Button'
    },
    {
        xtype: 'splitbutton',
        text : 'Split Button'
    },
    // begin using the right-justified button container
    '->', // same as { xtype: 'tbfill' }
    {
        xtype    : 'textfield',
        name     : 'field1',
        emptyText: 'enter search term'
    },
    // add a vertical separator bar between toolbar items
    '-', // same as {xtype: 'tbseparator'} to create Ext.toolbar.Separator
    'text 1', // same as {xtype: 'tbtext', text: 'text1'} to create Ext.toolbar.TextItem
    { xtype: 'tbspacer' },// same as ' ' to create Ext.toolbar.Spacer
    'text 2',
    { xtype: 'tbspacer', width: 50 }, // add a 50px space
    'text 3'
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM