Bambookit Home    Bambookit GUI Tutorial

Back    Next   

II. GUI Basics

Chapter 6. Widgets - Using Widgets to Create Interfaces


Radio Widget. Radio widget is always laid out in groups of two or more related items. Radio widgets within a group are mutually exclusive: only one option widget can be switched on at any one time.

XML Element Name



Radio widgets are placed in the widget that behaves like a container. We have specified the Radio's shape, label, anf group. setGroup has to be always set for Radios to be mutually exclusive. The radio's border, fonts, colors, and highlight take default settings.
<Widget setSize="200,100">
<Radio setShape="5,5,100,30" setLabel="Radio 1" setGroup="myradio"/>
<Radio setShape="5,40,100,30" setLabel="Radio 2" setGroup="myradio"/>

Radio methods

Basic set of methods that applies to all widgets is described in the Chapter 9 for widgets styles, and Chapter 10 for widgets attributes. For event handling methods please refer to Chapter 12.

The specific to the Radio are setValue and setGroup methods

Back    Next