forked from cnjinhao/nana-docs
-
Notifications
You must be signed in to change notification settings - Fork 6
Widget button
James Bremner edited this page Apr 4, 2019
·
5 revisions
// Construct button to be displayed on panel
nana::button btn( panel );
// Locate button in panel
btn.move( { topleftX, topleftY, width, height } );
// show text on button
btn.caption( "Press here" );
// click event handler
btn.events().click([&status]
{
status.caption("You pressed");
});