Announcement

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

    Hiding elements in Ribbongroup does not affect width of ribbongroup

    Hi,

    It seems that the width of the ribbongroup does not change when a button of the group is hidden (even with setAutoWidth() applied on the ribbon group).

    Setting the width of the ribbongroup manually and/or redrawing has no effect either.

    Is this supposed to work like this or can we change something to make it work as we would need (ribbon group adapts his size).

    Code:
    	public Canvas getViewPanel() {
    		
    		String ICON_SKIN_ACTION_ADD = "[SKINIMG]/actions/add.png";
    	
    		// Ribbon bar init and group setting
    		RibbonBar bar = new RibbonBar();
    		final RibbonGroup group = new RibbonGroup();
    		group.setNumRows(1);
    		group.setTitle("Ribbon Group");
    		group.setRowHeight(76);
    		group.setAutoWidth();
    		
    		// Large button
    		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);
    		
    		// Small button
    		final IconButton button2 = new IconButton("Add");
    		button2.setIcon(ICON_SKIN_ACTION_ADD);
    		group.addControl(button2);
    		
    		
    		// The hide button
    		Button hideAddButton = new Button("Hide addbutton");
    		hideAddButton.addClickHandler(new ClickHandler() {
    			
    			@Override
    			public void onClick(ClickEvent event) {
    				button2.hide();
    				group.setWidth(100); // even setting group width manual does nothing
    				group.redraw();// redraw has no effect
    			}
    		});
    		
    		bar.addMember(group);
    		
    		//Layouting
    		final VLayout main = new VLayout();
    		main.setOverflow(Overflow.VISIBLE);
    		
    		final VLayout v = new VLayout();
    		v.setOverflow(Overflow.VISIBLE);
    		v.addMember(bar);
    		
    		final VLayout v2 = new VLayout();
    		v2.setOverflow(Overflow.VISIBLE);
    		
    		v2.addMember(hideAddButton);
    		
    		main.addMember(v);
    		main.addMember(v2);
    		
    		return main;
    	}
    This is on SNAPSHOT_v9.0d_2013-06-04/Pro Deployment*(built*2013-06-04) with all current browser versions.

    thanks.

    PS: when initially adding the button to the group in hidden state (button.hide()) the width is adjusted in a proper matter.
    Last edited by jan.swaelens; 30 Sep 2013, 05:17.

    #2
    Thanks for the notification. We see the behavior you describe and a developer is taking a look. We'll let you know when we have more information

    Regards
    Isomorphic Software

    Comment


      #3
      Hello,
      The issue was fixed. Please download the next nightly or 4.0 build (dated Oct 10 or above) to get this fix.

      Regards
      Isomorphic Software

      Comment


        #4
        Hi, this is working now thanks!

        Comment

        Working...
        X