Created
March 25, 2010 09:51
-
-
Save javiertoledo/343379 to your computer and use it in GitHub Desktop.
ExtJs Auto columns Panel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* An Ext Panel which distribute items in equally-sized columns that fills all available width */ | |
Ext.ns("Ext.ux"); | |
Ext.ux.AutoColumnPanel = Ext.extend(Ext.Panel, { | |
layout: 'column', | |
initComponent: function() { | |
var columnWidth = 1/this.items.length; | |
Ext.each(this.items,function(item){ | |
Ext.apply(item,{ | |
columnWidth: columnWidth | |
}); | |
},this); | |
Ext.ux.AutoColumnPanel.superclass.initComponent.call(this); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment