View Full Version : Button Spacing
Xouqoa
6 Sep 2007, 12:47 PM
How do you add a line break or at least some veritical space between two buttons that have been added to the same form?
For example:
Instead of :
[button] [button]
I'd like:
[button]
[button]
var form = new Ext.form.Form({
labelAlign: 'top',
buttonAlign: 'left'
});
form.addButton({
// button 1
});
// something goes here
form.addButton({
// button 2
});
brian.moeskau
6 Sep 2007, 1:42 PM
There's not an easy way to do this because of the fact that buttons are laid out in a table for cross-browser consistency, and each button is in a separate TD. You may be better off creating your buttons manually (outside of form.addButton) and placing them manually inside the appropriate container. Is this alignment an absolute requirement for your layout? It seems pretty non-standard.
Xouqoa
6 Sep 2007, 2:40 PM
There's not an easy way to do this because of the fact that buttons are laid out in a table for cross-browser consistency, and each button is in a separate TD. You may be better off creating your buttons manually (outside of form.addButton) and placing them manually inside the appropriate container. Is this alignment an absolute requirement for your layout? It seems pretty non-standard.
Not absolutely required, no.
I am using an accordion style panel and just wanted the buttons to stack so that I didn't have to worry about them being too wide to fit in the panel width-wise. Right now I have two, and you can only see half of the second one. I'll try doing what you said, and if that fails I'll just split them up into two different panels. (That'll probably be the easiest way.)
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.