Home > DeveloperSection > Forums > Extjs - How to set border for the Container.
Pooja Malohtra
Pooja Malohtra

Total Post:47

Points:331
Posted on    May-05-2016 1:27 AM

 sencha extjs Sencha  Sencha Cmd 
Ratings:


 1 Reply(s)
 455  View(s)
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.!


Tarun Kumar

Total Post:213

Points:1635
Posted on    May-11-2016 11:35 PM

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
    }
});

Don't want to miss updates? Please click the below button!

Follow MindStick