PDA

View Full Version : [CLOSED] Window ToolButton does not mask correctly



takayser
5 May 2011, 8:43 AM
ToolButton has mask style but is still clickable.


@Override
public void onModuleLoad() {
Window window = new Window();
window.show();
window.getHeader().getTool(0).mask();
}

GXT 2.2, HostedMode, FF

sven
6 May 2011, 1:20 AM
This cannot be fixed in any GXT 2.X release because of backward compatibility. You have to use this workaround:


window.getHeader().getTool(0).addListener(Events.BrowserEvent, new Listener<ComponentEvent>() {

public void handleEvent(ComponentEvent be) {
if(be.getTargetEl().findParent(".ext-el-mask", -1) != null){
be.setCancelled(true);
}
}
});