Announcement

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

    When setDisabled is used on IconButton alignment of the button gets set to left

    When setDisabled is used, alignment of the button gets set to left (even after setAlignment() is called)

    String ICON_SKIN_ACTION_ADD = "[SKINIMG]/actions/add.png";

    RibbonBar bar = new RibbonBar();
    RibbonGroup group = new RibbonGroup();
    group.setNumRows(1);
    group.setTitle("Group Disabled");
    group.setRowHeight(76);
    group.setDisabled(true);

    IconButton button = new IconButton("A very long title");
    button.setAlign(Alignment.CENTER);
    button.setDisabled(false);
    button.setIcon(ICON_SKIN_ACTION_ADD);
    button.setLargeIcon(ICON_SKIN_ACTION_ADD);
    button.setOrientation("vertical");
    group.addControl(button);

    IconButton button2 = new IconButton("Add");
    button2.setIcon(ICON_SKIN_ACTION_ADD);
    group.addControl(button2);

    RibbonGroup group2 = new RibbonGroup();
    group2.setNumRows(1);
    group2.setTitle("Buttons Disabled");
    group2.setRowHeight(76);

    IconButton button3 = new IconButton("Add");
    button3.setIcon(ICON_SKIN_ACTION_ADD);
    button3.setLargeIcon(ICON_SKIN_ACTION_ADD);
    button3.setOrientation("vertical");
    button3.setDisabled(true);
    group2.addControl(button3);

    IconButton button4 = new IconButton("Add");
    button4.setIcon(ICON_SKIN_ACTION_ADD);
    button4.setDisabled(true);
    group2.addControl(button4);

    bar.addMember(group);
    bar.addMember(group2);

    final VLayout v = new VLayout();
    v.setOverflow(Overflow.VISIBLE);
    v.addMember(bar);

    Please advise why this occurs (SNAPSHOT_v8.3d_2012-10-11/Pro Deployment (built 2012-10-11)).

    #2
    We see the problem and have an engineer assigned to take a look.
    In the meantime you can fix this within your app code by calling 'setAlign()' after calling setDisabled() rather than before

    Regards
    Isomorphic Software

    Comment


      #3
      We've made a change that should address this - please retry with a nightly build from 20 October or later.

      Comment

      Working...
      X