Layout form fields horizontally
Posted
by
Don
on Stack Overflow
See other posts from Stack Overflow
or by Don
Published on 2011-11-17T16:44:36Z
Indexed on
2011/11/17
17:51 UTC
Read the original article
Hit count: 224
JavaScript
|extjs
I'm using Ext JS 2.3.0 and have a bunch of fields contained within a FieldSet
I'd like to have them laid out side-by-side instead, ideally with the label on top of the field instead of to the left of it. The relevant code is:
var kpiFilterCombo = new Ext.form.ComboBox({
name: 'kpi',
store: this.dashboardInst.servicesModel.getAvailableKPIsStore()
});
var kpiLower = new Ext.form.TextField({
fieldLabel: "Lower",
name: 'lowerBound'
});
var kpiUpper = new Ext.form.TextField({
fieldLabel: "Higher",
name: 'upperBound'
});
var kpiFilterFieldset = new Ext.form.FieldSet({
title: locale['label.kpi.condition'],
checkboxToggle: true,
collapsed: true,
autoHeight:true,
items : [
kpiLower,
kpiFilterCombo,
kpiUpper,
]
});
© Stack Overflow or respective owner