2011-09-18 76 views
4

如何使用uibinder在GWT中创建图像按钮。我目前的代码如下所示:使用uibinder的Gwt图像按钮

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> 
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" 
    xmlns:g="urn:import:com.google.gwt.user.client.ui"> 
    <ui:with type="com.test.client.Resources" field="res"></ui:with> 
    <g:HTMLPanel> 
     <g:Image resource="{res.facebook_32}"/> 
     <g:PushButton> 
      <g:downFace image="{res.facebook_32}"></g:downFace> 
      <g:upFace image="{res.facebook_32}"></g:upFace> 
     </g:PushButton> 
    </g:HTMLPanel> 
</ui:UiBinder> 

图像打印正确,图像资源正常工作。

回答

5

这里的目标是什么?常规图像可以表现为按钮。这是你以后的事情吗?

+0

检查,该工程。只有箭头不会变成“点击手”。 –

+0

这就是CSS。只需使用光标:指针; – elvispt