| 1 | # ############################################################################## | ||
| 2 | # # Script : Calendar.pl # | ||
| 3 | # # -------------------------------------------------------------------------- # | ||
| 4 | # # Copyright : This program is free software; you can redistribute it and/or # | ||
| 5 | # # modify it under the same terms as Perl itself. # | ||
| 6 | # # Author : Jürgen von Brietzke JvBSoft # | ||
| 7 | # # Version : 1.2.01 16.Jun.2013 # | ||
| 8 | # ############################################################################## | ||
| 9 | # # http://incrtcl.sourceforge.net/iwidgets/iwidgets/calendar.html # | ||
| 10 | # ############################################################################## | ||
| 11 | |||
| 12 | use strict; | ||
| 13 | use warnings; | ||
| 14 | |||
| 15 | use Tkx::TclTk::Bind::IWidgets; | ||
| 16 | |||
| 17 | # ############################################################################## | ||
| 18 | |||
| 19 | my $main_window = Tkx::widget->new(q{.}); | ||
| 20 | $main_window->Tkx::wm_title('Calendar Example'); | ||
| 21 | my $calendar = $main_window->new_iwidgets__Calendar( | ||
| 22 | -startday => 'monday', | ||
| 23 | -days => 'M T W T F S S', | ||
| 24 | -outline => 'black', | ||
| 25 | -weekendbackground => '#CCCCCC', | ||
| 26 | -width => 250, | ||
| 27 | -height => 200, | ||
| 28 | ); | ||
| 29 | Tkx::pack( $calendar, -expand => 'yes', -fill => 'both' ); | ||
| 30 | $calendar->select('yesterday'); | ||
| 31 | print "Yesterday was: " . $calendar->get; | ||
| 32 | Tkx::MainLoop(); | ||
| 33 | |||
| 34 | # ############################################################################## | ||
| 35 | # # E N D # | ||
| 36 | # ############################################################################## |