ActiveTcl User Guide
|
||
iwidgets::calendar pathName ?options? itk::Widget <- iwid-
gets::calendar
background cursor foreground
tions.
int
junction with the dateentry widget. It is necessary for support of international date formats in versions of Tk < 8.4.
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 Replaced with the date
selected in the format mm/dd/yyyy.
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 ac-
ceptable 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.
_________________________________________________________________
selection of a date, displaying a single month at a time. But- tons exist on the top to change the month in effect turning the pages of a calendar. As a page is turned, the dates for the month are modified. Selection of a date visually marks that date. The selected value can be monitored via the -command op- tion or just retrieved using the get command.
name is pathName. This command may be used to invoke various op- erations on the widget. It has the following general form:
pathName option ?arg arg ...?
pathName cget option Returns the current value of the configura- tion option given by option. Option may have any of the values accepted by the iwidgets::calendar command. pathName configure ?option? ?value option value ...? Query or modify the configura- tion options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see
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 iwid*- gets::calendar command. pathName get ?format? Returns the cur- rently selected date in a format of string or as an integer clock value using the -string and -clicks format options respectively.
information on obtaining dates and their formats. pathName se*- lect date Changes the currently selected date to the value speci- fied 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. Note that selecting a date does not change the month being shown to that of the date given. This chore is left to the show command. path-
the date argument 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 for- mats.
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.
package require Iwidgets 4.0
proc selectCmd {date} {
puts $date
}
iwidgets::calendar .c -command {selectCmd %d} \
-weekendbackground mistyrose \
-weekdaybackground ghostwhite -outline black \ -startday wednesday
-days {We Th Fr Sa Su Mo Tu} pack .c