forked from cnjinhao/nana-docs
-
Notifications
You must be signed in to change notification settings - Fork 6
Widget radiobutton
James Bremner edited this page Apr 5, 2019
·
2 revisions
Doxygen description of radio_group
There is no radio button widget. Instead, add checkboxes to a radio_group and they will be transformed into a group of radio buttons.
// construct checkboxes to be displayed on fm
nana::checkbox rb1( fm );
nana::checkbox rb2( fm );
nana::checkbox rb3( fm );
// Convert checkboxes to radiobuttons by adding to radio_goup
nana::radio_group rg;
rg.add( rb1 );
rg.add( rb2 );
rg.add( rb3 );
// locate on fm
rb1.move({ 20,20, 100,25});
rb2.move({ 20,50, 100,25});
rb3.move({ 20,80, 100,25});
// captions
rb1.caption("Option 1");
rb2.caption("Option 2");
rb3.caption("Option 3");