User Tools

Site Tools


DzCheckBox

Script wrapper for QCheckBox.

More...

Inherits :

Properties

Constructors

DAZ Script
DzCheckBox ( DzWidget parent )

Detailed Description

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”).

Example:

// Create a new dialog
var wDlg = new DzDialog;
wDlg.caption = "DzCheckBox Example";
 
// Create a layout for the dialog
var wLyt = new DzVBoxLayout( wDlg );
wLyt.autoAdd = true;
 
// Create a group box for the options
var wOptGB = new DzVGroupBox( wDlg );
wOptGB.columns = 1;
 
// Create the options
var wOpt1Btn = new DzCheckBox( wOptGB );
wOpt1Btn.text = "Option 1";
wOpt1Btn.checked = true;
var wOpt2Btn = new DzCheckBox( wOptGB );
wOpt2Btn.text = "Option 2";
var wOpt3Btn = new DzCheckBox( wOptGB );
wOpt3Btn.text = "Option 3";
wOpt3Btn.checked = true;
 
// Launch the dialog
wDlg.exec();

Properties


Boolean : checked

Holds whether or not the button is checked. true if the button is checked. false by default.


Boolean : tristate

Holds whether or not the checkbox is a tri-state checkbox. The default is two-state (e.g. tri-state is false).

Constructors


DzCheckBox( DzWidget parent )

Creates a check box as a child of the given parent widget