Extjs - How to set border for the Container.

Total Post:47

Points:331
 1404  View(s)
Ratings:
Rate this:
I have created a container, now I want to create border for our container.
My container code is below:
MyContainer = Ext.extend(Ext.Container, {
    height: 50,
    width: 300,
    id: 'container1',
    initComponent: function() {
        MyContainer.superclass.initComponent.call(this);
    }
});
Please help me.!
  1. Post:214

    Points:1642
    Re: Extjs - How to set border for the Container.

    You can set the border like this:

     MyContainer = Ext.extend(Ext.Container, {
        height: 50,
        width: 300,
        id: 'container1',
        border: 1,
        style: {
           borderColor: 'blue',
           borderStyle: 'solid'
        },
        initComponent: function() {
            // do your stuff here
        }
    });

Answer