Anthony Fletcher > Tk-Month-1.7 > Tk::Month

Download:
Tk-Month-1.7.tar.gz

Dependencies

Annotate this POD

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

NAME ^

Tk::Month - Calendar widget which shows one month at a time.

SYNOPSIS ^

  use Tk;
  use Tk::Month;

  $m = $parent->Month(
                -month          => 'July',
                -year           => '1997',
                -title          => '%b %y',
                -command        => \&press,
                -printformat=> '%e',
                -navigation     => [0|1],
                -includeall     => [0|1],
                -showall        => [0|1],
                -first          => [0|1|2|3|4|5|6],
        )->pack();

  $m->configure(
                -month          => 'July',
                -year           => '1997',
                -command        => \&press,
                -printformat=> '%e %B %Y %A',
                -navigation     => [0|1],
                -includeall     => [0|1],
                -showall        => [0|1],
                -first          => [0|1|2|3|4|5|6],
  );

  $m->separator();
  $m->command(
                -label          => 'Label',
                -command        => \&callback,
  );

DESCRIPTION ^

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

FUNCTIONS ^

$m->separator();

        Adds a separator to the title menu.

$m->command(...);

        Adds an entry to the title menu. This can be used to add 
        extra functionality, such as closing the calendar widget or
        printing a month.

OPTIONS ^

-month => 'month'

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

-year => 'year'

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

-title => 'strftime format'

        Sets the format for the widget title.
        The default is '%B %Y'.

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

-printformat => "strftime format"

        Set the default format for dates when they are passed in an
        array of arrays to the -command function.
        The default is '%e %B %Y'.

-dayformat => "strftime format"

        Set the default format for the days within the widget.
        The default is '%e', i.e. the date of each day.

DISCONTINUED -printcommand => \&print

        Add an entry to the title menu using the 'command' function.

DISCONTINUTED -close => $widget,

        Add an entry to the title menu using the 'command' function.

-showall => [0|1]

        Causes the dates on buttons not actually in the month to be
        dsiplay. The default is to not show these dates.

-includeall => [0|1]

        Causes the side buttons to include all the non-month dates.
        The defaults is to include all the dates.

-first => [0|1|2|3|4|5|6]

        Sets the first day of the week.
        The default is 0 (i.e. Sunday).

-navigation => [0|1],

        Sets whether the navigation buttons and menu are included.
        The default is to show the naviagation aids.

-side => [0|1],

        Sets whether the side buttons are included.
        The default is to show the side button aids.
syntax highlighting: