Tk::Year - Calendar widget which shows one year at a time.
use Tk; use Tk::Year; $m = $parent->Year( -year => '1997', -cols => 3, -sep => 5, -first => [0|1|2|3|4|5|6], -command => \&press, )->pack(); $m->configure( -year => '1997', -first => [0|1|2|3|4|5|6], ); $m->advance(<number-of-years>); $m->separator(); $m->command( -label => 'Label', -command => \&callback, );
Tk::Year is a general purpose calendar widget which shows one year at a time and allowes user defined button actions.
This advances the year shown by the specified number of years; negative numbers go backwards.
The title (shouwing the current year) is a Tk::Menubutton and all the Tk::Menubutton actions can be applied to Tk::Year.
Sets the required year. The default is the current year.
Sets the number of columns used to display the year. The default is 3.
Sets the separation between the columns of months. The default is 5 pixels.
These options apply to each of the Tk::Month widgets.
Set the command to execute when a button is pressed. This function must accept a string (the title of the Month widget) and an array of arrays of dates. Each date is of the format specified by the -printformat option. The default is to print out the list on standard output.