Non-XUL extension. It is used to replace XUL menulist. This class is more flexible than menulist, such as {@link #setAutocomplete} {@link #setAutodrop}.
Default {@link #getZclass}: z-combobox.(since 3.5.0)
Events: onOpen, onSelect
Developers can listen to the onOpen event and initializes it when {@link org.zkoss.zk.ui.event.OpenEvent#isOpen} is true, and/or clean up iffalse. *
Besides assign a list model, you could assign a renderer (a {@link ComboitemRenderer} instance) to a combobox, such that the comboboxwill use this renderer to render the data returned by {@link ListModel#getElementAt}. If not assigned, the default renderer, which assumes a label per combo item, is used. In other words, the default renderer adds a label to a row by calling toString against the object returned by {@link ListModel#getElementAt}.
Note: to have better performance, onOpen is sent only if a non-deferrable event listener is registered (see {@link org.zkoss.zk.ui.event.Deferrable}).
Like {@link Datebox}, the value of a read-only comobobox ( {@link #isReadonly}) can be changed by dropping down the list and selecting an combo item (though users cannot type anything in the input box). @author tomyeh @see Comboitem @since 3.5.2
|
|
|
|
|
|