嗨,我正在使用GXT如何把图标放在GXT中按钮的中心
我有一个带有图标的按钮。
我想把Icon放在中间。
目前看起来像这样。
按钮的图标是在左(因为IconAlign.LEFT的)。
我想要它在中心。但是有没有像IconAlign.CENTER
如果任何人有一个想法是什么在code.Please共享添加
代码
button.setIconAlign(IconAlign.LEFT);
button.setIcon(Resources.INSTANCE.modify());
button.setStyleName("project-Button");
CSS
.project-Button {
color: Black;
border: thin outset #FF6600;
font-family: Courier New, Century Gothic, Times New Roman, Verdana, Arial;
vertical-align: middle;
text-align: center;
background-color: White;
cursor: pointer;
}
预先感谢您
更新
public interface Resources extends ClientBundle {
public Resources INSTANCE = GWT.create(Resources.class);
@Source("Images/modify.png")
ImageResource modify();
}
根据您放置该CSS规则的位置,它可能由于混淆而无法应用。您可能需要像使用图标一样使用“ClientBundle”。 – enrybo 2013-04-10 19:12:06
我正在使用clientBundle .. Plz chk更新areai问题。 – NewCodeLearner 2013-04-11 08:34:31