Bandbox

A band box is a special text box that embeds a customizable popup window (aka., a dropdown window). Like comboboxes, a bandbox consists of an input box and a popup window. The popup window is opened automatically, when users presses Alt+DOWN or clicks the

button.

Unlike comboboxes, the popup window of a bandbox could be anything. It is designed to give developers the maximal flexibility. A typical use is to represent the popup window as a search dialog.

        <bandboxid="bd">        
        <bandpopup>        
                <vbox>                
            <hbox>Search<textbox/></hbox>            
            <listboxwidth="200px"            
            onSelect="bd.value=self.selectedItem.label;bd.closeDropdown();">            
            <listhead>            
                    <listheaderlabel="Name"/>                    
                    <listheaderlabel="Description"/>                    
            </listhead>            
            <listitem>            
                    <listcelllabel="John"/>                    
                    <listcelllabel="CEO"/>                    
            </listitem>            
            <listitem>            
                    <listcelllabel="Joe"/>                    
                    <listcelllabel="Engineer"/>                    
            </listitem>            
            <listitem>            
                    <listcelllabel="Mary"/>                    
                    <listcelllabel="Supervisor"/>                    
            </listitem>            
        </listbox>        
        </vbox>        
        </bandpopup>        
    </bandbox>    

Class Name

org.zkoss.zul.Bandbox

Supported Child Components

Bandpopup

Supported Events

Name

Event Type

onOpen

Event: org.zkoss.zk.ui.event.OpenEvent

Denotes user has opened or closed a component. Note: unlike onClose, this event is only a notification. The client sends this event after opening or closing the component.

Properties

Property

Description

Data Type

Default Value

autodrop

Sets whether to automatically drop the list if users is changing this text box.

boolean

false

buttonVisible

Sets whether the button (on the right of the textbox) is visible.

boolean

true

image

Sets the image URI that is displayed as the button to open Bandpopup.

java.lang.String

"~./zul/img/bandbtn.gif".

multiline

Sets whether it is multiline.

boolean

false

rows

Sets the rows.

int

1

Methods

Name

Description

Return Data Type

clone()

java.lang.Object

closeDropdown()

Closes the popup (getDropdown()).

void

getDropdown()

Returns the dropdown window belonging to this band box.

org.zkoss.zul.Bandpopup

getInnerAttrs()

Generates the Client-Side-Action attributes to the interior tag.

java.lang.String

getOuterAttrs()

Returns west componennt

java.lang.String

getRealStyleFlags()

Returns RS_NO_WIDTH|RS_NO_HEIGHT.

insertBefore(org.zkoss.zk.ui.Component newChild, org.zkoss.zk.ui.Component refChild)

boolean

Inherited From