RadioButton Class Reference

The RadioButton JavaScript class. A simplified version of the RadioButton Qt widget. More...

Properties

String text
 The text for the RadioButton label. More...
 
bool checked
 Toggle whether or not the RadioButton is checked. More...
 

Detailed Description

The RadioButton JavaScript class. A simplified version of the RadioButton Qt widget.

var myDialog = new Dialog();
myDialog.title = “RadioButton Example”;
var optionOne = new RadioButton();
optionOne.text = “Pick me!”;
var optionTwo = new RadioButton();
optionTwo.text = “No, pick me!”;
myDialog.add( optionOne );
myDialog.newColumn();
myDialog.add( optionTwo );
if ( myDialog.exec() )
{
if( optionOne.checked )
MessageLog.trace( “You picked the first option.” );
else if ( optionTwo.checked )
MessageLog.trace( “You picked the second option.” );
else
MessageLog.trace( “Neither option was selected.” );
}

Property Documentation

◆ checked

bool RadioButton::checked
readwrite

Toggle whether or not the RadioButton is checked.

◆ text

String RadioButton::text
readwrite

The text for the RadioButton label.