Announcement

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

    Updating Icon of a SubmitItem

    I believe I've found a minor bug in SmartGWT 2.4, but posting here first to confirm before submitting it as an issue. Specifically, I created a form with SubmitItem in it and I'm giving the SubmitItem an icon with code like the following:

    Code:
      DynamicForm form = new DynamicForm();
      SubmitItem loginButton = new SubmitItem("login", "Login");
      loginButton.setIcon("/resources/images/icons/16/login.png");
      form.setFields(loginButton);
    If I then later try and change the icon of the button based on a user event with code like the following, the icon doesn't change:

    Code:
      loginButton.setIcon("/resources/images/icons/16/other.png");
    However, if I instead do the following, it works fine:

    Code:
      ((Button)loginButton.getCanvas()).setIcon("/resources/images/icons/16/other.png");
    Can someone let me know if something else is expected when invoking the SubmitItem.setIcon() method after rendering the form in order to get the new icon to appear? Or, is this a bug?

    #2
    This was already corrected after 2.4 - nightly builds are available at smartclient.com/builds.

    Comment


      #3
      Sounds good. Thanks for the quick reply!

      Comment

      Working...
      X