Processing...
Description & Source Code

ZK combo boxes offer auto-complete and auto drop down features; items matching the characters entered are automatically displayed in a drop down menu. The combo boxes also come with optional styling; a button may be added to trigger the drop down menu manually (a downward arrow is shown here), and the combo boxes are available with round corners. For keystroke commands, press Alt+DOWN to expand the drop-down list, and the UP and DOWN arrow keys to traverse through items.

autocomplete.zul
<zk>
	<combobox id="combo" autodrop="true" buttonVisible="false"/>
	<zscript><![CDATA[
	    /*Dictionary.getDictionary() returns a String[] containing the dictionary words*/
		ListModel dictModel= new SimpleListModel(demo.data.Dictionary.getDirectory());
		combo.setModel(dictModel);
	]]></zscript>
</zk>
autocomplete_ctrl.zul
<vlayout>
	<checkbox checked="true" label="Enable Auto Drop-down"
		onCheck="combo.autodrop = self.checked" />
	<checkbox label="Make Button visible"
		onCheck="combo.buttonVisible = self.checked" />			
</vlayout>