开发者

gwt not showing the right image

I have a gwt image object . In my code I set my visibleRect like this:

btnSearch.setVisibleRect(-64,-80,16,16);

So when I run my code with firebug the html looks like this:

<img border="0" style="width: 16px; height: 16px; background: url(&quot;http://tempest/deltaflow/Content/Images/icon.png&quot;) no-repeat scroll 64px 80px transparent;" src="http://127.0.0.1:8888/trunkui/clear.cache.gif">

Why is the '-' left off? When I edit it with firebug to have the 开发者_开发问答'-' it works fine.


According to [http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/Image.html#setVisibleRect(int, int, int, int)][1] the values inside setvisiblerect can never be negative. measuer ur desired rectangle portion from your top left corner and try again.

[1]: http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/Image.html#setVisibleRect(int, int, int, int)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜