-
29 Sep 2009 5:12 PM #1
icon postion in button ignored by setIconStyle
icon postion in button ignored by setIconStyle
I am using the button.setIconStyle() call using 16 x 16 icon.
the icon always comes out anchored to the top left hand corner of the button. see attached.
I tried centering it using
Apparently the position css params get ignored during the call.Code:.valign-top { background: url('images/top.png') no-repeat center center; }
May I ask, how is the icons supposed to be aligned to the center of the button?
setIconAlign(IconAlign.BOTTOM) does work, but there is no IconAlign.CENTER.
This is gxt 2.0.1
-
29 Sep 2009 5:32 PM #2
when I do the same thing on another bigger project, the icons do automatically come out aligned. But I am not sure what the difference is.
for the small test project where the misalignment occurs, it only occurs on FF and IE6.
-
30 Sep 2009 6:29 AM #3
did you check with firebug all css applied to the button?
if it is only in a test project then i think you setup a newer gxt version. maybe you forget to update also the css files from this new version.This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.
GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts • Search Results • Advanced Search form • Category overview http://www.extjs.com/forum/showthrea...041#post410041


Reply With Quote