Search code examples
javascriptextjslayoutextjs4extjs4.2

Column layout - how to set textfield witdth


I have a formpanel which contains textfield items. Here is a fiddle demonstrating my current screen

Is there anyway to make the width of the textfield take up less than the entire width of the column? Basically, I want the columns stay at the sizes they are (2 columns at 50% each), but I do not want the textfield taking up that entire space of the column.

Can this be achieved using a column layout like I have now?


Solution

  • I think you just use Ext.layout.container.Column wrong way.

    In your example each textfield working as column itself and total columnWidth is 1.5.

    columnWidths must always add up to 1 (or 100%) when added together, otherwise your layout may not render as expected.

    You have to use any container component as column and add textfields to this containers.

    Check this simple example.