Hi,
When clicking the icon on the ToolStripMenuButton, its ClickHandler is fired (OK).
The same code for an IconMenuButton doesn't fire its ClickHandler.
Is this intended?
Repro: clicking the IconMenuButton's arrow doesn't do anything.
The docs for addIconClickHandler say "may be defined", so not needed by default to get the icon click working, I assume?
v8.3p_2012-11-30/Pro Deployment (built 2012-11-30)
cheers,
When clicking the icon on the ToolStripMenuButton, its ClickHandler is fired (OK).
The same code for an IconMenuButton doesn't fire its ClickHandler.
Is this intended?
Repro: clicking the IconMenuButton's arrow doesn't do anything.
Code:
IconMenuButton btn = new IconMenuButton("No Color Change"); btn.setShowFocusedAsOver(false); final HLayout h = new HLayout(); h.setWidth(200); h.setHeight(200); btn.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { h.setBackgroundColor("red"); } }); ToolStripMenuButton btn2 = new ToolStripMenuButton("Color Change"); btn2.setShowFocusedAsOver(false); btn2.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { h.setBackgroundColor("red"); } }); // DOCS for addIconClickHandler //If this button is showing an icon, a separate click handler for the icon may be defined as this.iconClick. //Returning false will suppress the standard button click handling code. RibbonBar bar = new RibbonBar(); RibbonGroup group = new RibbonGroup(); group.setNumRows(2); group.setTitle("Group Disabled"); group.setRowHeight(76); group.addControl(btn); group.addControl(btn2); bar.addMember(group); final VLayout v = new VLayout(); v.setOverflow(Overflow.VISIBLE); v.addMember(bar); v.addMember(h);
v8.3p_2012-11-30/Pro Deployment (built 2012-11-30)
cheers,
Comment