From: Ben E. <ben...@ea...> - 2001-04-18 20:27:39
|
OK, I will rise to the challenge! I've have go this far, however, now need a bit of help. The problem is - the label layer is displayed behind the list layer. You'll have to excuse me, I'm still very new to DHTML / the DynAPI. I know this is a z-index thing. But, where do I fix it? Neither the label nor list widget take a z-index argument, so I went into label.js and list.js and amended the line where they instantiate a DynLayer: Label.prototype = new DynLayer(); and put in null for all other arguments but z-index. Label.prototype = new DynLayer(null,null,null,null,null,null,null,2); Then I did the same for the list dynalyer call (with a different z-index). However, this seems to have no effect whatsoever. Here's my selectList widget code so far (I'm happy to post the rest when I'm finished). I'm working on IE5.5, Win98. ------------code start--------------- function selectList(title) { this.superClass=DynLayer this.superClass() this.id="selectList"+(selectList.Count++) this.moveTo(100,100) this.setSize(500,350) this.setBgColor('black') var l=new EventListener(this) l.oncreate=function(e) { var o=e.getTarget() o.label = new Label('') o.label.setText('this is a padded wrappable label') o.label.setWrap(true) o.label.moveTo(0,0) o.label.setBgColor('yellow') o.label.setPadding(5) o.label.setWidth(250) o.label.packHeight() o.addChild(o.label) o.list = new List() o.list.moveTo(0,-75) o.list.setWidth(250) o.list.setBgColor('#000000') o.list.boldOnSelect(true) o.list.add("Item One",1) o.list.add("Item Two",2) o.list.add("Item Three",3) o.list.add("Item Four",4) o.addChild(o.label) o.addChild(o.list) o.list.events = new EventListener(o.list) o.list.events.onmousedown=function(e){ if (!o.list.open) { o.list.slideTo(0,25) o.list.open=true } else { o.list.slideTo(0,-75) o.list.open=false } } o.list.addEventListener(o.list.events) } this.addEventListener(l) return this } selectList.Count=0 selectList.prototype=new DynLayer() selectList.prototype.getSubClass=function() { return button } -----------code end---------------- |