-
24 Dec 2011 7:12 AM #1
Button textAlign Doesn't Work
Button textAlign Doesn't Work
The button config setting textAlign no longer works. From a quick look at the code it seems that the bit that does this during rendering has been removed.
Test case:
I don't want to sound all preachy but I'm a little concerned if this wasn't picked up by either an automated test or QA. It's not a subtle failure.Code:Ext.create('Ext.button.Button', { renderTo: Ext.getBody(), text: 'Click', textAlign: 'left', width: 200 });
-
24 Dec 2011 7:47 AM #2
Thanks for the early warning.
examples/button/button.html is fairly comprehensive, and is checked for visual correctness.
But I see now that it doesn't cover all cases.
I'll expand it to use text alignment with various icon options.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
24 Dec 2011 7:56 AM #3
It didn't appear to work in 4.0.2. I just added a textAlign: 'left' section to that test page and ran it under 4.0.2, and the alignment was center, so I think this is an old bug.
I'll get it fixed though.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
24 Dec 2011 8:01 AM #4
According to the release notes this feature wasn't added till 4.0.4. It worked fine in 4.0.7.
-
24 Dec 2011 8:21 AM #5
Well the code was there. I'd just made an error... It's getBtnClass that has to create a class name for the button element based upon the textAlign property.. Duh!
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642


Reply With Quote