PDA

View Full Version : Aligning a button in a table layout.. best practice



JeanNiBee
15 Feb 2010, 4:27 PM
Hi

I have a set of fields in a fieldset / formpanel and each row contains three items: the label, button (optional) and a field. (in that order).

I need to align the field RIGHT, Button CENTER and field LEFT.

I can align the field using "css:" IF I've configured the component using 'html: 'Some Text here' config option.

The minute I change to an actual panel / component {xtype: 'label', text: 'Something'} or { xtype: 'button', icon: 'blah', text: 'click me'}... the alignment is lost.

So, what should I be doing that I'm missing when I look at the docs examples... cls, cellCls and ctCls seem to be ignored?

Now I did find the { bodyCfg: { tag: 'center' } } option to work but of course this only center aligns, nothing for left or right etc etc.

Thanks.