Skip to content
James Bremner edited this page Apr 4, 2019 · 2 revisions

checkbox

Doxygen description of label

Usage:

#include <nana/gui/widgets/checkbox.hpp>

/// Construct checkbox to be displayed in panel
nana::checkbox cb( panel );

/// move to location in panel
cb.move( { topleftX, topleftY, width, height } );

/// label the checkbox
cb.caption( "Toggle truth" );

/// respond when it is toggled
cb->events().click([this]
{
     if( ! cb.checked() )
          status.caption("false");
     else
          status.caption("true");
});
Clone this wiki locally