Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Strange Canvas.resizeTo behaviour.

    Hi,

    I'm seeing something that I don't understand.

    If I create an configure an ImgButton like this:

    Code:
    ImgButton maxButton = new ImgButton() {{
    	setWidth(15);
    	setHeight(15);
    }};
    , then it works as expected.

    However, if I use resizeTo (instead of the setWidth and setHeight calls), like this:

    Code:
    ImgButton maxButton = new ImgButton() {{
    	resizeTo(15, 15);
    }};
    , then the button is not sized as expected.
    (It's sized as 440x210, according to both the Developer Console and Firebug.)

    What could be the reason of this?
    Is not calling resizeTo(w, h) equivivalent to subsequently calling setWidth(w) and setHeight(h)?

    Thank you for you help:

    Csillag

    ps. GWT 2.4, SmartGWT 2.5, FF 6

    #2
    This clearly can't be reproduced with the code shown - let us know if you can create a test case that would allow us to look at the problem.

    Comment


      #3
      At first I was not even sure if this is a problem, or simply I am misunderstanding the indented behavior.

      I wanted you to confirm that the above two code excerpts should yield identical results, before I start spending time to create a standalone test case for the non-bug.

      OK, so I will create a stand-alone test case.

      Comment

      Working...
      X