PDA

View Full Version : Fixed form field width



desp
29 Oct 2012, 2:45 AM
Hello,
I am placing many form inputs in 4-column layout with 0.25 width each. All inputs are filling whole column's space, labelAlign is 'top'. How to set certain input's fixed size? I need it for example for numberfield, which holds only 1 digit or other low space requiring items.

My layout looks like:


vbox0:
column: (defaults: { columnWidth: 0.25, labelAlign: 'top' })
form.field0
form.field1
form.field2
form.field3
...
vboxN:
column:
...

sword-it
29 Oct 2012, 3:59 AM
Hi desp,

You can use minWidth and maxWidth config of text field.
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.form.field.Number-cfg-maxWidth

desp
29 Oct 2012, 4:51 AM
It does not work.. By the way I forgot to mention that small input cause whole collumn to shrink. Why? I set it to 25% of container.