3.2.0

integrating overlib with activewidgets?

Could anybody please post some sample code on integrating overlib with activewidgets?
September 17,
To make pop-ups it's not that hard.

Out of our open source software:

Active.Templates.Text.prototype.setEvent ("onmouseover", onmouseover );
openmodelinggrid.init = function () {
var obj = this.prototype;
this.inputsprocessed = false;
/* function to hide the contextmenu parent is the object who needs the grid */
obj.setAction("click", function(e) {
if (this.gridactionDOM) {
this.gridactionDOM.style.display = "none";
//reset height of grid after hiding the action pane
//this.resetgridheight ();
}
if (this.parent && this.parent.page) this.parent.page.hidemenu (this.getOpenmodelingProperty ("currentevent"));
});

obj.setAction("mouseover", function(src) {
var e = this.getOpenmodelingProperty ("currentevent")
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.style.height = "100px";
}

drag.innerHTML = src.getProperty("item/text");
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);
});

// workaround for model proxy bug
obj._DataProxy = null;
obj._RowProxy = null;
/*****************************************************************
openmodelingproperties
*****************************************************************/
obj.defineModel("openmodeling");
obj.defineOpenmodelingProperty("contextmenu", true );
obj.defineOpenmodelingProperty("titlebar", false );

obj.defineOpenmodelingProperty("searchfilteraddavailable", false );
obj.defineOpenmodelingProperty("dragavailable", true );
obj.defineOpenmodelingProperty("originalrowcount", 0 );
obj.defineOpenmodelingProperty("currentevent", null );
obj.defineOpenmodelingProperty("columndata", new Array () );
obj.defineOpenmodelingProperty("maxrelation", 2000 ); // maximum 2000 rows

// based on the length of the fields defined in database a width on the screen is determined
obj.defineOpenmodelingProperty ("lengthmultiplier", 3.0 );
obj.defineOpenmodelingProperty ("contextmenuvisible", false);
obj.defineOpenmodelingProperty ("doubleclick", false);
// possible values add search filter
obj.defineOpenmodelingProperty("mode", 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
September 17,

This topic is archived.

See also:


Back to support forum