[英]gwt pushButton in UiBinder
我需要使用UiBinder
在gwt
創建一個pushButton(所以它是一個帶圖像的按鈕),但我不確定如何繼續。 這是我的ui.xml
代碼:
<g:PushButton ui:field="myPushButton"/>
在* .java文件中我定義了:
PushButton myPushButton;
如何將圖像添加到按鈕? 我嘗試了以下但不起作用:
<g:PushButton ui:field="myPushButton" image="myImage.gif" />
謝謝
您可以直接從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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.