问题
Is it possible to produce a figure in Rascal that shows a tooltiptext during hover? I mean the little yellow thing like the one prescribed by the title
attribute of a <a>
tag in HTML.
回答1:
yes in these slides (http://homepages.cwi.nl/~jurgenv/teaching/evolution1314/slides/intro-visualization.pdf) an example is shown:
FProperty popup(str S){
return mouseOver(box(text(S), fillColor("lightyellow"),
grow(1.2),resizable(false)));
}
box(size(50),fillColor("red"), popup("Hello"))
来源:https://stackoverflow.com/questions/20299595/hover-tooltiptext-in-rascal-figure