PDA

View Full Version : ToolTips on disabled elements



jraue
7 Apr 2009, 5:40 AM
Hi,

I noted that Ext GWT does not show ToolTips on disabled elements (at least for TextToolItem). Is that really the desired behavior?

E.g. MS Office applications do show tool tips for disabled elements in the tool bar, and IMHO this would be the better behavior also for Ext GWT.

Would love to see that change in the next release.

Cheers,

Joachim

jraue
9 Apr 2009, 1:03 AM
As a workaround, it would be possible to use:


public class MenuBarToolItem extends TextToolItem {
public MenuBarToolItem() {
button = new Button() {
@Override
public void onBrowserEvent(Event event) {
int type = DOM.eventGetType(event);

if (disabled && (type == Event.ONMOUSEOVER || type == Event.ONMOUSEOUT)) {
enable();
super.onBrowserEvent(event);
disable();
} else {
super.onBrowserEvent(event);
}
}
};
}
}