//Debug.write("validateCountry: ",str);
// must ensure the floatinglist is closed so that if it is being tabbed from,
// we can change the focus. (focus is normally not allowed to escape from
// a modal view).
this.setOpen(false);
return lz.Focus.getNext(interior.cbtext);
// must ensure the floatinglist is closed so that if it is being tabbed from,
// we can change the focus. (focus is normally not allowed to escape from
// a modal view).
this.setOpen(false);
return interior.cbtext;
var txt = classroot.cblist.getText();
if ( !txt ) {
if ( classroot.defaultselection ) {
if ( classroot.cblist._contentview != null ) {
classroot.cblist.selectItemAt( classroot.defaultselection );
txt = classroot.cblist.getText();
}
} else {
txt = classroot.defaulttext;
}
}
if (this.cbtext) this.cbtext.setAttribute('text', txt );
if (this._dsblfield) this._dsblfield.setAttribute('text', txt );
parent._applystyle( parent.style );
if ( classroot['onfocus'] ) classroot.onfocus.sendEvent(v);
this.initSelect=true;
classroot.setAttribute('text', this.getText() );
if ( classroot['onblur'] ) classroot.onblur.sendEvent(v);
if ( classroot['onkeyup'] ) classroot.onkeyup.sendEvent(kc);
if ( classroot['onkeydown'] ) classroot.onkeydown.sendEvent(kc);
return classroot.getFocusRect();
this.dataoption = owner.dataoption;
if (kc == 27) { // escape needs to close floating list
this.owner.setOpen(false);
}
for (var eg in _contentview.subviews){
_removeitem(_contentview.subviews[eg]);
}
this.defaultselection = ds;
if ( ds == null ) return;
if ( defaulttext != "" ) {
this.defaulttext = "";
//Debug.write("defaultselection overrides defaulttext",this);
}
if ( this.ondefaultselection ) this.ondefaultselection.sendEvent();
this.cblist.datapath.setPointer( d );
this.itemclassname = icn; // before anything is inited capture value
if ( this.isinited ) { // view is now inited so check classname with cblist
if (icn != "") {
// then force this classname as the classname for cblist
cblist.setAttribute('itemclassname',this.itemclassname);
} else {
//use the default subview as the classname
this.itemclassname = cblist.itemclassname;
}
}
if (this.onitemclassname) this.onitemclassname.sendEvent();
if (placement == 'cblist')
return this.cblist.determinePlacement(newsub, placement, iargs);
else
return super.determinePlacement(newsub, placement, iargs);
this._initcomplete = true;
super.init();
// reassign classname now that the instance is inited
this.setItemclassname(this.itemclassname);
cblist.setVisible(false);
if ( lz.Focus.getFocus() != this.interior.cbtext )
this.setOpen(false);
var fx = this.getAttributeRelative('x',canvas);
var fy = this.getAttributeRelative('y',canvas);
var fw = this.getAttributeRelative('width',canvas);
var fh = this.getAttributeRelative('height',canvas);
return [fx,fy,fw,fh];
this.cblist.select(item);
this.interior.cbtext.setSelection(_fixseldel.start, _fixseldel.end);
this.setOpen(!this.isopen, withkey)
if (!this.isinited) {
this.isopen = open;
return;
}
if (open) { // open combox
if (this.isopen) return; // tends to get called more than once, esp when
lz.ModeManager.makeModal( this );
this.cblist.bringToFront();
this.cblist.setVisible(true);
lz.Focus.setFocus(this.cblist, withkey);
this.isopen = true;
if (this['onisopen']) this.onisopen.sendEvent(true);
} else { // close combox
if (!this['isopen']) return;
this.isopen = false;
lz.ModeManager.release( this );
this.cblist.setVisible(false);
if (this['onisopen']) this.onisopen.sendEvent(false);
if ( lz.Focus.getFocus() == this.cblist ) {
lz.Focus.setFocus(interior.cbtext, withkey);
}
}
this.setAttribute('text', d );
var rv;
var ra = this.cblist.getValue(); // an array of values
if (ra==null) {
rv = this.interior.cbtext.getText();
} else {
rv = ra;
}
return rv;
this.text = t;
this.interior.cbtext.setAttribute('text', t );
if (!this._enabled) interior._dsblfield.setAttribute('text', t );
if ( this.ontext ) this.ontext.sendEvent( t );
return this.interior.cbtext.getText();
return this.cblist.getSelection();
this.cblist.addItem(txt,val);
return this.cblist.getItem(value);
return this.cblist.getItemAt(index);
this.cblist.removeItem(value);
this.cblist.removeItemAt(index);
if (initSelect) this.interior.cbtext.initSelect=true;
this.cblist.selectItem(value);
this.cblist.selectItemAt(index);
this.cblist.clearSelection();
this.setAttribute('text',"");
if (this.style != null) {
interior.editbkgnd.setAttribute("bgcolor", s.textfieldcolor);
interior.cbtext.setAttribute('bgcolor',s.textfieldcolor);
setTint(bkgnd, s.basecolor);
}
interior.cbtext.setVisible(this._enabled);
if (!this._enabled) {
if (interior._dsblfield == null) {
var t = new LzText(interior,
{ name: '_dsblfield', x: 2, y: 1,
width:interior.width, height:interior.height,
fgcolor:this['style'] ? this.style.textdisabledcolor : null});
} else {
interior._dsblfield.setVisible(true);
}
interior._dsblfield.setAttribute('text',this.getText());
} else {
if (interior._dsblfield) interior._dsblfield.setVisible(false);
}
super.setWidth(Math.max(w,this.min_width));
super._showEnabled();
if (_enabled) {
this.bkgnd.lft.setAttribute('frame', 1 );
this.bkgnd.mid.setAttribute('frame', 1 );
} else {
this.bkgnd.lft.setAttribute('frame', 3 );
this.bkgnd.mid.setAttribute('frame', 3 );
}