<_newinternalinputtext name="inp" x="${parent.border}" y="${parent.border}" height="${parent.height - parent.border * 2}" width="${parent.width - parent.vscrollwidth - parent.border*2}" scrollevents="true"> if (this.inited) { var scroll = 1 - Math.floor(p / this.lineheight); if (scroll !== this.scroll) { this.setAttribute('scroll', scroll); //Debug.info('pos', p, this.scroll) } this.pos = p; if (this.onpos) this.onpos.sendEvent(p); } this.setAttribute('pos', -this.lineheight * (this.scroll - 1)); this.setAttribute("vscrollwidth", (v ? this._vs.width : 0)); if (this['_vs'] == null) { var classname = this.vscrollbarclassname; if (classname == "") { classname = "vscrollbar"; } if ($debug) { if (typeof(lz[classname]) == "undefined") { Debug.warn("scrollbarclassname undefined", this); } } if(typeof(lz[classname]) != "undefined"){ this._vs = new lz[classname](this, { axis: "y", scrollattr: "pos", scrollmax: "0", scrolltarget: this.inp}); var xDel = new lz.Delegate(this, 'updateX'); xDel.register(this['_vs'], 'onwidth'); xDel.register(this, 'onwidth'); xDel.register(this, 'onborder'); new lz.Delegate(this, 'updateScrollMax', this.inp, 'onscrollheight'); new lz.Delegate(this, 'updateStepSize', this.inp, 'onlineheight'); // call once manually this.updateX(); this.updateStepSize(); } } if(this['_vs']){ this._vs.setAttribute("x", this.width - this._vs.width ); } if(this['_vs']){ this._vs.setAttribute("stepsize", this.inp.lineheight); } if(this['_vs']){ this._vs.setAttribute("scrollmax", this.inp.scrollheight); } super.init(); this.ensurevscrollbar(); setvscrollwidthfromvisibility(this['_vs'] ? this._vs.visible : false); this.myDel = new lz.Delegate(this, "setvscrollwidthfromvisibility", this['_vs'], "onvisible");