NAME

Tk::Year - Calendar widget which shows one year at a time.

SYNOPSIS

  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,
  );

DESCRIPTION

Tk::Year is a general purpose calendar widget which shows one year at a time and allowes user defined button actions.

FUNCTIONS

$m->advance(<number-of-years>);

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.

OPTIONS

-year => 'year'

Sets the required year. The default is the current year.

-cols => 'columns'

Sets the number of columns used to display the year. The default is 3.

-sep => 'sep'

Sets the separation between the columns of months. The default is 5 pixels.

-first

-buttonhighlightcolor

-buttonhighlightbackground

-buttonfg

-buttonbg

-buttonbd

-buttonrelief

These options apply to each of the Tk::Month widgets.

-command => \&press

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.