DzRadioButton Class Reference
[Interface Widget Objects]

DAZ Script radio button widget. More...

Inheritance diagram for DzRadioButton:

DzButton DzWidget List of all members.

Properties

Boolean checked

Constructors

 DzRadioButton (DzWidget parent)

Detailed Description

DAZ Script radio button widget.

DzRadioButton and DzCheckBox are both option buttons (e.g. they can be checked or unchecked). They differ in how the available choices are restricted. A DzCheckBox is used to define several choices that can all co-exist at the same time (e.g. "many of many"). While a DzRadioButton is used to provide several choices, where only one can be ultimately chosen (e.g. "one of many").

The easiest way to implement a "one of many" type choice is to create radio buttons as children of a DzButtonGroup.

Example:
    // Create a new dialog
    var wDlg = new DzDialog;
    wDlg.caption = "DzRadioButton Example";

    // Create a layout for the dialog
    var wLyt = new DzVBoxLayout( wDlg );
    wLyt.autoAdd = true;

    // Create a button group for the options
    var wOptBG = new DzVButtonGroup( wDlg );
    wOptBG.columns = 1;

    // Create the options
    var wOpt1Btn = new DzRadioButton( wOptBG );
    wOpt1Btn.text = "Option 1";
    wOpt1Btn.checked =true;
    var wOpt2Btn = new DzRadioButton( wOptBG );
    wOpt2Btn.text = "Option 2";
    var wOpt3Btn = new DzRadioButton( wOptBG );
    wOpt3Btn.text = "Option 3";

    // Launch the dialog
    wDlg.exec();


Constructor & Destructor Documentation

DzRadioButton::DzRadioButton ( DzWidget  parent  ) 

Creates a radio button as a child of the given parent widget


Member Data Documentation

bool DzRadioButton::checked

Whether the button is checked


Generated on Thu Sep 24 12:21:14 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.