calendar - Create and manipulate a monthly calendar
calendar pathName ?options?
itk::Widget <- calendar
background cursor foreground
options.
ton. This image must have been created previously with the image create command. If none is specified, a default is provided.
tons in any of the forms acceptable to Tk_GetColor. The default
color is blue.
the calendar. If the command script contains any % characters,
then the script will not be executed directly. Instead, a new
script will be generated by replacing each %, and the character
following it, with information from the calendar. The replace-
ment depends on the character following the %, as defined in the
list below.
%d
forms acceptable to Tk_GetFont.
the forms acceptable to Tk_GetFont.
the forms acceptable to Tk_GetFont.
text to displayed above the days of the month. The default value
is {Su Mo Tu We Th Fr Sa}.
ton. This image must have been created previously with the image create command. If none is specified, a default is provided.
request from its geometry manager. The value may be specified in
any of the forms acceptable to Tk_GetPixels. The default height
is 165 pixels.
month text in any of the forms acceptable to Tk_GetColor. The default is the same color as the background.
currently selected date in any of the forms acceptable to Tk_Get-
the currently selected date. The default is 3 pixels.
wednesday, thursday, friday, or saturday. The default is sunday.
month and year. The font may be given in any of the forms
acceptable to Tk_GetFont.
to be visually distinguished from the weekend. The color may be
given in any of the forms acceptable to Tk_GetColor. The default
is the same as the background.
to be visually distinguished from the weekdays. The color may be
given in any of the forms acceptable to Tk_GetColor. The default
is the same as the background.
request from its geometry manager. The value may be specified in
any of the forms acceptable to Tk_GetPixels. The default width
is 200 pixels.
_________________________________________________________________
of a date, displaying a single month at a time. Buttons exist on the top to change the month in effect turning the pages of a cal- endar. As a page is turned, the dates for the month are modi- fied. Selection of a date visually marks that date. The selected value can be monitored via the -command option or just retrieved using the get command.
pathName. This command may be used to invoke various operations on the widget. It has the following general form:
pathName option ?arg arg ...?
pathName cget option
option. Option may have any of the values accepted by the calen-
dar command.
pathName configure ?option? ?value option value ...?
option is specified, returns a list describing all of the avail-
able options for pathName (see Tk_ConfigureInfo for information
on the format of this list). If option is specified with no
value, then the command returns a list describing the one named
option (this list will be identical to the corresponding sublist
of the value returned if no option is specified). If one or more
option-value pairs are specified, then the command modifies the
given widget option(s) to have the given value(s); in this case
the command returns an empty string. Option may have any of the
values accepted by the calendar command.
pathName get ?format?
an integer clock value using the -string and -clicks format
options respectively. The default is by string. Reference the
clock command for more information on obtaining dates and their
formats.
pathName select date
must be in the form of a date string, an integer clock value or
as the keyword «now". Reference the clock command for more
information on obtaining dates and their formats. Note that
selecting a date does not change the month being shown to that of
the date given. This chore is left to the showcommand.
pathName show date
ment which must be in the form of a date string, an integer clock value or as the keyword «now". Reference the clock command for more information on obtaining dates and their formats.
the calendar that changes the month to be the next. See the
«button» widget manual entry for details on the forward component
item.
of the week, and days of the month appear. See the «canvas» wid- get manual entry for details on the page component item.
the calendar that changes the month to be the next. See the «button» widget manual entry for details on the backward compo- nent item.
proc selectCmd {date} {
puts $date
}
calendar .c -command {selectCmd %d} -weekendbackground mistyrose \ -weekdaybackground ghostwhite -outline black \ -startday wednesday -days {We Th Fr Sa Su Mo Tu} pack .c
calendar, widget