PDA

View Full Version : How to align two comboboxes right next to each other?



wavedan
10 Aug 2010, 5:35 AM
I have one Ext.form.TimeField and I want to align another Ext.form.TimeField to the right of it without it going on a new line. For example I set width to 50 to make both small enough and want to place both next to each other.

wavedan
10 Aug 2010, 5:57 AM
It seems that layout: 'anchor' is what I am currently using.
Is table layout what I need?

Chods
10 Aug 2010, 8:37 AM
It seems that layout: 'anchor' is what I am currently using.
Is table layout what I need?

You could do although I normally use columnLayout or sometimes hbox

wavedan
10 Aug 2010, 10:25 PM
You could do although I normally use columnLayout or sometimes hbox

I found out I am already using column layout, but I didn't get it to work, as the combobox is allocated in the next column. What I want is to essentially have two comboboxes in the same column. What's the easiest way to accomplish this with my existing layout?

Code:



var window = new Ext.Window({
title: 'Registrer',
width: 800,
height:500,
minWidth: 800,
minHeight: 500,
layout: 'anchor',
plain:false,
bodyStyle:'padding:5px;',
buttonAlign:'center',
closable: false,
items: [{
items: registrationformPanel
},{
items: infoPanel
}],


And in registrationformPanel:



items: [{
layout:'column',
items:[{
columnWidth:.50,
layout: 'form',
items: [
company_id,
company_name,
orgno,
firstname,
lastname,
address1,
postalcode,
postalarea
]
},{
columnWidth:.50,
layout: 'form',
items: [
phone1,
mobile,
fax1,
email,
www,
bankaccount,
member_password,
member_confirm_password,
bransje