#!/usr/bin/perl
use Tkx;

sub handle_click {
    Tkx::bgerror("Button was clicked!");
}

Tkx::grid( Tkx::ttk__button(".b", -text => "Click me!", -command => \&handle_click, ) );
Tkx::MainLoop();
