"Layout run failed" error message when i hide toolbar in xtype: 'htmleditor'

155 Views Asked by At

I use xtype: 'htmleditor' in my code without toolbar. When I hide it I have a Layout run failed error message. What can I do to overcome this error?

{
    xtype: 'htmleditor',
    rows: 2,
    itemId: 'display',
    colspan: 6,
    margin: '0 0 20 0',
    rtl: true,
    layout: {
        type: 'vbox',
        align: 'stretch'
    },
    readOnly: true,
    height: 200,
    width: 292
},

In another class I hide this toolbar:

{
    xtype: 'triggerfield',
    itemId: 'fml',
    type: 'formula',
    allowBlank: false,
    editable: false,
    layout: {
        type: 'vbox',
        align: 'stretch'
    },
    fieldLabel: Dufo.ux.fa.formula,
    fieldStyle: 'direction: ltr !important',
    onTriggerClick: function() {
        Ext.create(Dufo.view.other.Formula, { opener: this}).show();
        Ext.ComponentQuery.query('#display')[0].toolbar.hide(false);
        Ext.ComponentQuery.query('#display')[0].toolbar.setVisible(false);
    }
}

When I hide this toolbar I encountered the Layout run failed error. How can I fix this?

1

There are 1 best solutions below

0
sed.bahadori On

thank you for your attention and your answers. I find out what can I do to hide my toolbar in xtype: 'htmleditor', I write this code for doing this:

{
        xtype: 'htmleditor',
        rows: 2,
        itemId: 'display',
        colspan: 6,
        margin: '0 0 20 0',
        rtl: true,
        layout: 'fit',
        frame: false,
        enableColors: false,
        enableAlignments: false,
        enableFont: false,
        enableFontSize: false,
        enableFormat : false,
        enableLinks : false,
        enableLists : false,
        enableSourceEdit: false,
        readOnly: true,
        height: 200,
        width: 292
    },