/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rjconsultores.ventaboletos.web.utilerias;

import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zul.Combobox;

/**
 * 
 * @author gleimar
 */
public class MyComboboxEstandar extends Combobox {

	private static final long serialVersionUID = 1L;

	public MyComboboxEstandar() {
		super();

		this.setAutodrop(true);
		this.setAutocomplete(true);
		this.setReadonly(true);
		this.setCtrlKeys("#del");

		this.addEventListener("onCtrlKey", new EventListener() {

			@Override
			public void onEvent(Event event) throws Exception {
				MyComboboxEstandar.this.setSelectedItem(null);
				MyComboboxEstandar.this.close();
			}
		});
	}
}
