Add CSS styling to extjs panel

Simply add bodyStyle attribute to the panel and use it like inline CSS.

Ext.define('extjs.view.authentication.UserHeader', {
extend: 'Ext.form.Panel',
alias: 'widget.userheader',
defaultType: 'textfield',
id: 'useStoreHead',
bodyStyle: 'background: #1E82CC;',
height: 100,
bodyPadding: 5,
items: [{
id: 'useStoreText',
fieldLabel: 'Currently Loged In User',
    listeners: {
   afterrender: {
     fn: function() {
          this.setValue(GLOBAL_USER.userID);
     }
   }
    },
readOnly: 'true'
}]
});

Powered by Blogger.