The onChanging Event

Since a bandbox is also a text box, the onChanging event will be sent if you add a listener for it. By listening to this event, you could manipulate the popup window any way you like.

As illustrated below, you could fill the drop-down list based on what user is entering.

<bandbox id="band" autodrop="true" onChanging="suggest()"/>
<zscript>
    void suggest() {    
        if (event.value.startsWith("A")) {        
            ...//do something            
        } else if (event.value.startsWith("B")) {        
            ...//do another            
        }        
    }    
</zscript>

Notice that, when the onChanging event is received, the content of the bandbox is not changed yet. Thus, you cannot use the value property of the bandbox. Rather, you shall use the value property of the event (org.zkoss.zk.ui.event.InputEvent).