你好,我正在处理GXT相关的工作。
我有一个带图标的按钮。
我想把图标放在中间。
目前它看起来像这样。
由于IconAlign.LEFT,按钮的图标在左边。
我想让它居中。但是没有IconAlign.CENTER这样的选项。
如果有人知道需要在代码中添加什么,请分享。
代码
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();
}
ClientBundle
。 - enrybo