View Full Version : [CLOSED][3.??] Panel Buttons Left Justified

11 Jan 2010, 10:14 PM
Something changed between the 3.1 release and svn rev 5864 to cause buttons added via a Panel's addButton() method or defined directly in the configuration to be left justified.

Previously, they defaulted to a right justification. Look at any Ext sample with buttons for an example. The Dynamic Forms example or the AJAX with XML Forms example show this behavior well.

I believe the buttons should be right justified. Perhaps there was a css change somewhere that inadvertently affected button justification in Panels.

- Jul

12 Jan 2010, 2:36 AM
More information:

This is happening with FF3.5, IE7 and IE8
If you set buttonAlign:'center', a panel correctly centers the buttons.
If you set buttonAlign:'right', it continues to align to the left.

Firebug shows this for the td that wraps all the buttons in the footer of a panel:
<td class="x-toolbar-left" align="left">

That is what shows with the default buttonAlign, when buttonAlign is set to 'left' and when it's set to 'right'. When buttonAlign is set to 'center', it looks like this:
<td class="x-toolbar-left" align="center">

The default for buttonAlign in Panel.js looks correct, so something else is setting the alignment to 'left' and ignoring an explicit configuration for 'right'.

15 Jan 2010, 11:06 AM
See http://www.extjs.com/forum/showthread.php?t=89834

15 Jan 2010, 11:13 AM
Interesting. Looks like you found the same bug I did.

Jamie Avins
15 Jan 2010, 11:21 AM
Yes, going to dupe this one so we only have it once in Trac.

15 Jan 2010, 11:30 AM
OK. His evaluation of the bug was significantly more detailed than mine. :)