Hi, I extended the List widget as MyList and added it to my page using the DynAPI.document.addInflowChild(layerName) - api call.
But myList does not seem to receive mouse events (clicks) However it works if I add the widget to my html, using the standard way, thru the DyAPI.onLoad() function. Besides the "text" of the items added to myList can be selected by dragging the mouse over them. My code :- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <META name="GENERATOR" content="IBM WebSphere Studio"> <META http-equiv="Content-Style-Type" content="text/css"> <LINK href="theme/Master.css" rel="stylesheet" type="text/css"> <TITLE>OptionsMenu.html</TITLE> <SCRIPT language="JavaScript" src="dynapi.js"></SCRIPT> <SCRIPT language="Javascript"> DynAPI.setLibraryPath('./lib/') DynAPI.include('dynapi.api.*') DynAPI.include('dynapi.event.*') DynAPI.include('dynapi.ext.inline.js') DynAPI.include("dynapi.gui.label.js") DynAPI.include("dynapi.gui.list.js") </SCRIPT> <SCRIPT language="Javascript"> function MyList() { this.List = List; this.selectedIndex = List.selectedIndex; this.selectedItem = List.selectedItem; this.ievents = new EventListener(this); this.ievents.onselect = function(e) { e.getTarget().select(e.getSource()); } this.ievents.ondeselect = function(e){ e.getTarget().deselect(e.getSource()); }; return this; } MyList.prototype = new List(); MyList.prototype.select = function(item) { window.status = "in myList select func " + this.getIndexOf(item); this.invokeEvent("deselect"); } MyList.prototype._oldDeselect=List.prototype.deselect; MyList.prototype.deselect = function(item) { alert("in deselect()"); this._oldDeselect(item) //this is akin to super() of OOP. Calls the deselect function provided in the List widget } </script> <SCRIPT language="Javascript"> oList = new MyList() oList.moveTo(0, 0) oList.setWidth(250) oList.setBgColor('#c0c0c0') oList.boldOnSelect(true) oList.setSelectionMode(false) //single Select mode oList.setBorders(1) //border around individual items oList.setSpacing(5) //spacing between items setUpOptions() function setUpOptions() { oList.add("Quick quote",1) oList.add("Customer lookup",2) oList.add("Branch quote queue",3) oList.add("Scotia Leasing queue",4) oList.add("Reporting",5) oList.add("System maintainance",6) } </script> </HEAD> <BODY> <BODY> <CENTER> <TABLE border="0"> <TBODY> <TR> <TD valign="middle" align="center">Welcome to NBS</TD> </TR> <TR> <TD>You can do the follwing in this system</TD> </TR> <TR> <TD> <script>DynAPI.document.addInflowChild(oList)</script> </TD> </TR> </TBODY> </TABLE> </CENTER> </BODY> </HTML> Any clues? rgds g1 ************************************************************************** This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. ************************************************************************** ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dynapi-Help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dynapi-help