File: widget_dateentry.man

package info (click to toggle)
r-cran-tcltk2 1.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,744 kB
  • sloc: tcl: 59,824; ansic: 792; python: 324; sed: 53; sh: 17; makefile: 2
file content (123 lines) | stat: -rw-r--r-- 2,804 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 0.98]
[manpage_begin widget_dateentry n [vset VERSION]]
[keywords date]
[keywords dateentry]
[keywords megawidget]
[keywords snit]
[keywords widget]
[moddesc   {Various megawidgets}]
[titledesc {Date Entry Megawidget}]
[category Widget]
[require Tcl 8.4]
[require Tk 8.4]
[require widget [opt 3.0]]
[require widget::dateentry [opt [vset VERSION]]]
[description]

This package provides a dateentry megawidget (snidget).
It is based on an ttk::entry. All widget commands of the ttk::entry
are available for the dateentry.

[para]

[list_begin definitions]

[call [cmd widget::dateentry] [arg pathname] [opt options]]

[list_end]

[section "WIDGET OPTIONS"]

[para]
[list_begin options]

[opt_def -command]

A command prefix to evaluate when a date was selected.

The command prefix is executed in the global namespace and given two
arguments, the raw date in seconds, and the formatted date, as per
option [option -dateformat].

[opt_def -dateformat]

The format of the date that is entered or returned. Default: %m/%d/%Y.

[opt_def -firstday]

See the [package widget::calendar] man page.

[opt_def -font]

Select the font used in the widget. It defaults to Helvetica 9.

[opt_def -highlightcolor]

See the [package widget::calendar] man page.
See the calendar man page.

[opt_def -language]

See the [package widget::calendar] man page.

[opt_def -shadecolor]

See the [package widget::calendar] man page.

[opt_def -showpast]

See the [package widget::calendar] man page.

[opt_def -textvariable]

Specifies the name of a variable whose value is linked to the entry widget's contents.
Whenever the variable changes value, the widget's contents are updated, and vice versa.

[list_end]

[section "WIDGET COMMAND"]

[list_begin definitions]

[call [arg pathname] [cmd get]]

Returns the selected date.

[call [arg pathname] [cmd set] [arg date]]

Programmatically sets a new date. Expects that the date is in the same format
as configured by option [option -dateformat].

[para] The same effect can also be achieved by setting a linked
[option -textvariable].

[list_end]



[section "DEFAULT BINDINGS"]

On creation of the dateentry widget the following bindings are installed.
For navigation within the calendar, see its manpage.
[list_begin itemized]
[item]
Button-1 - Accept and select the date and close the calendar window.
[item]
Return, space - Accept the selected date and close the calendar window
[item]
Escape - Close calendar window
[item]
Control-space - Show calendar window
[list_end]

[section EXAMPLE]

[example {
    package require widget::dateentry; # or widget::all
    set t [widget::dateentry .de]
    pack $t -fill x -expand 1
}]
[vset CATEGORY widget::dateentry]
[include ../../support/devel/doc/feedback.inc]
[manpage_end]