View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Anthony Fletcher > Tk-Month-1.7 > Tk::Year



Annotate this POD

View/Report Bugs
Module Version: 1.0   Source   Latest Release: Tk-Month-1.8


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,

                -year           => '1997',
                -first          => [0|1|2|3|4|5|6],


                -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.


-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.








        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.
syntax highlighting: