A Rich UI tooltip widget defines hover help: text or widgets that are displayed when the user hovers over a widget. A tooltip is displayed only if you enable the tooltip widget, as described in this section. You can use the same tooltip for several widgets, and you can enable the tooltip for a given widget in response to a runtime event.
package myPkg;
import com.ibm.egl.rui.widgets.Box;
import com.ibm.egl.rui.widgets.Button;
import com.ibm.egl.rui.widgets.Tooltip;
import egl.ui.rui.Event;
Handler MyHandler Type RUIHandler { initialUI = [theButton],
onConstructionFunction= begin }
theButton Button { text = "Start", onClick ::= click };
theToolTip Tooltip { text = "To toggle the text, click the button!",
delay = 800 };
myBox Box{};
function begin()
theToolTip.enable(theButton);
end
Function click(e Event in)
if (theButton.text == "Start")
theButton.text = "Stop";
else
theButton.text = "Start";
end
end
end

Function GoToWebsite(myWidget any in) returns(Box)
myLink html{text =
"You can rely on <a target = \"_blank\", href=\"http://www.ibm.com\">IBM</a>";
myBox.children = [mylink];
return (myBox);
end
Delegate TooltipTextProvider(widget any in) returns(Box) end
Be aware of the issue described in “Rich UI memory management.”
import com.ibm.egl.rui.widgets.ToolTip;