【问题标题】:gwt pushButton in UiBinderUiBinder 中的 gwt 按钮
【发布时间】:2011-04-21 14:13:31
【问题描述】:

我需要在gwtUiBinder 中创建一个按钮(所以它是一个带图像的按钮),但我不确定如何进行。这是我的ui.xml 代码:

在 *.java 文件中我定义了:
PushButton myPushButton;

如何将图像添加到按钮?我尝试了以下方法,但不起作用:

谢谢

【问题讨论】:

    标签: java gwt uibinder


    【解决方案1】:

    您可以直接使用 CustomButton Javadoc 中的以下代码:

    g:PushButton ui:field='pushButton' enabled='true'>
       <g:upFace>
         <b>click me</b>
       </g:upFace>
       <g:upHoveringFace>
         <b>Click ME!</b>
       </g:upHoveringFace>
    
       <g:downFace image='{downButton}'/>
       <g:downHoveringFace image='{downButton}'/>
     </g:PushButton>
    

    JavaDoc 中还有更多内容:http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/client/ui/CustomButton.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多