#include <Wt/WCheckBox>
Public Member Functions | |
WCheckBox (WContainerWidget *parent=0) | |
Create a checkbox with empty label. | |
WCheckBox (const WString &text, WContainerWidget *parent=0) | |
Create a checkbox with given label. |
A label is added as a sibling of the checkbox to the same parent.
Usage example:
Wt::WGroupBox *box = new Wt::WGroupBox("In-flight options"); Wt::WCheckBox *w1 = new Wt::WCheckBox("Vegetarian diet", box); box->addWidget(new WBreak()); Wt::WCheckBox *w2 = new Wt::WCheckBox("WIFI access", box); box->addWidget(new WBreak()); Wt::WCheckBox *w3 = new Wt::WCheckBox("AC plug", box); w1->setChecked(false); w2->setChecked(true); w3->setChecked(true);
The widget corresponds to the HTML <input type="checkbox">
tag.
WCheckBox is an inline widget.