<_newinternalinputtext name="inp" x="${parent.border}"
y="${parent.border}"
height="${parent.height-parent.border*2}"
width="${parent.width - parent.vscrollwidth - parent.border*2 }">
if (this.isinited) {
this.setScroll(1 - (p / this.lineheight));
this.pos = p;
if (this.onpos) this.onpos.sendEvent(p);
}
this.setPos(-this.lineheight * (this.scroll - 1), true);
if (this._vs == null) {
var classname = this.vscrollbarclassname;
if (classname == "") {
classname = "vscrollbar";
}
if ($debug) {
if (typeof(global[classname]) == "undefined") {
Debug.write("scrollbarclassname undefined", this);
}
}
var vsinit = function () {
var p = this.parent;
// (_vs) x="${parent.width - this.width - parent.border + 1}"
this.applyConstraint("x",
function() { this.setAttribute("x", this.parent.width - this.width - this.parent.border + 1); },
[p, "width", this, "width", p, "border"]);
// (_vs) stepsize="${scrolltarget.lineheight}"
this.applyConstraint("stepsize",
function() { this.setAttribute("stepsize", this.scrolltarget.lineheight); },
[p.inp, "lineheight"]);
// (_vs) scrollmax="${scrolltarget.maxheight}" />
this.applyConstraint("scrollmax",
function() { this.setAttribute("scrollmax", this.scrolltarget.maxheight); },
[p.inp, "maxheight"]);
#pragma "methodName=init"
super.init();
}
this._vs = new global[classname](this,
{ axis: "y",
scrollattr: "pos",
scrolltarget: this.inp,
init: vsinit});
}
super.init();
this.ensurevscrollbar();