Widgets»X Check

X Check

XCheck, or eXclusive Check is a widget similar in function to Check, yet it supposed to be grouped in exclusive-selection groups. It is commonly known as Radio button in other GUI toolkits.

Source docs

The XOR-selection is accomplished by using the group property, passing the XCheck an instance of XorSelector. Additionally, DefaultOption may be used to mark the default-selected option within a group.

Example:

XorSelector grp;
DefaultOption = XCheck().text("option 1").group(grp);
XCheck().text("option 2").group(grp);
XCheck().text("option 3").group(grp);

int selected = grp.index;