Reputation: 3728
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("http://tempest/deltaflow/Content/Images/icon.png") 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.
Upvotes: 0
Views: 389
Reputation: 3333
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)
Upvotes: 1