:: Forum >>
How to change appearance of TOOLTIP popup
Can anyone please tell me how you can change the appearance of the tooltip.
ie background colour / border / font etc.
Cheers
Andy
Andy Rush
Thursday, September 22, 2005
oh and also the timeout value.. (wan't it on permanently while onmouseover).
A.
Andy Rush
Thursday, September 22, 2005
In this example a tooltip in column 12 only
Active.Templates.Text.prototype.setEvent ("onmouseover", onmouseover );
openmodelinggrid = Active.Controls.Grid.subclass();
openmodelinggrid.init = function () {
obj.setAction("mouseover", function(src) {
var e = this.getOpenmodelingProperty ("currentevent");
var oobject = geteventsource (e);
var cid = oobject.id;
var nlen = cid.length;
var ccolumn11 = ".item:11";
var nlencolumn11 = ccolumn11.length;
var npos = cid.indexOf ( ccolumn11 );
if (npos != -1 && (npos == nlen - nlencolumn11) ) { // only mouse over effect in the twelfth column
var drag = document.getElementById("draggingPart");
if (drag == null) {
drag = document.createElement("DIV");
drag.setAttribute("id","draggingPart");
//drag.style.MozOpacity = 0.8;
//drag.style.filter = "alpha(opacity=50)";
drag.style.font = "menu";
drag.style.border = "1px solid threedlightshadow";
drag.style.backgroundColor = "#ffffff";
drag.style.width = "50%";
drag.style.width = "50%";
}
drag.innerHTML = src.getProperty("item/text"); // @# cid stond hier nog in weggehaald
drag.style.left = _pagePosX(e)+ 20; // offset +10 otherwise target == movingdata;
drag.style.top = _pagePosY(e);
drag.style.position = "absolute";
//var drag = document.createElement("DIV");
//drag.setAttribute("id","draggingPart");
/*-moz-opacity:0.5; filter:alpha(opacity=50);*/
document.body.appendChild(drag);
}
});
obj.defineOpenmodelingProperty("currentevent", null );
}
openmodelinggrid.init ();
function onmouseover (e) {
if (this.setOpenmodelingProperty) {
e.cancelBubble = true;
e.returnValue = false;
this.setOpenmodelingProperty ("currentevent", e);
if (this.action) {
this.action ("mouseover");
}
}
}
John Ophof http://open-modeling.sourceforge.net
Tuesday, September 27, 2005
This topic is archived.
Back to support forum
Forum search