Radiogroup

Used to group multiple radio buttons. In one radiogroup. Only one radio button may be selected at a time.

<window title="Radiobox &amp; Radio Demo" >
<vbox>
<radiogroup onCheck="fruit.value = self.selectedItem.label">
<radio label="Apple"/>
<radio label="Orange"/>
<radio label="Banana"/>
</radiogroup>
You have selected :<label id="fruit" style="color:red"/>
</vbox>
</window>

Note: To support the versatile layout, a radio group accepts any kind of children , including Radio. On the other hand, the parent of a radio, if any, must be a radio group.

Class Name

org.zkoss.zul.Radiogroup

Supported Child Components

*ALL

Supported Events

*NONE

Properties

Property

Description

Data Type

value

The String value denote this radio.

String

selectedIndex

the index of the selected radio button (-1 if no one is selected).

int

selectedItem

the selected radio button.

org.zkoss.zul.Radio

name

the name of this group of radio buttons.

String

Methods

Name

Description

Return Data Type

getItemCount

Returns the number of radio buttons in this group.

int

app endItem

Appends a radio button.

org.zkoss.zul.Radio

removeItemAt

Removes the child radio button in the list box at the given index.

org.zkoss.zul.Radio

Inherited From