Tk Library Source Code

Attachment Details
Login
Overview

Artifact ID: 45b2250ad70e9a8e6367757df12a046267d49d80
Ticket: fa7e4857020c0688d2e8477c45841a8eac851871
Date: 2017-04-03 19:58:09
User: AdE@BfzPL
Artifact Attached: 51a61d2b2e404fab8451a86bdba1a98f1b3c8ca5
Filename:datefield.man
Description:Proposal for "datefield.man" version 0.3 (Sorry, I've no knowledge about the right format!)
Content Appended
     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
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin datefield n 0.3]
[see_also clock(n)]
[see_also entry(n)]
[keywords clock]
[keywords date]
[keywords dateentry]
[keywords entry]
[keywords widget]
[copyright {Keith Vetter <[email protected]>} and
{Thomas Wunderlich <[email protected]>}]
[moddesc {Tk datefield widget}]
[titledesc {Tk datefield widget}]
[category Widget]
[require Tk]
[require datefield [opt 0.3]]
[description]

The [package datefield] package provides the datefield widget which
is an enhanced text entry widget for the purpose of date entry. There
are three valid formats for the dates which can be entered:
[list_begin [enum]]
[enum] English form MM/DD/YYYY using [arg {-format "%m/%d/%Y"}] (default)
[enum] German form DD.MM.YYYY using [arg {-format "%d.%m.%Y"}]
[enum] ISO form YYYY-MM-DD using [arg {-format "%Y-%m-%d"}]
[list_end]

[para]

The datefield widget is, in fact, just an entry widget with
specialized bindings. This means all the command and options for an
entry widget apply equally here.

[section COMMANDS]

[list_begin definitions]
[call [cmd ::datefield::datefield] [arg widgetpath] [opt [arg options]]]

Creates and configures a date field widget.

[list_end]

[section OPTIONS]

[list_begin definitions]
[call [arg -format]]

One of "%m/%d/%Y" (English, default if option left), "%d.%m.%Y" (German),
or "%Y-%m-%d" (ISO).

[list_end]

[para]

See the [cmd entry] manual entry for details on all remaining/available
options.

[section EXAMPLE]
[example {
 package require datefield

 wm title . "Datefield example"
 proc DayOfWeek {args} {
     set now [clock scan $::myDate]
     set ::myDate2 [clock format $now -format %A]
 }
 trace variable myDate w DayOfWeek

 ::datefield::datefield .df -textvariable myDate -format "%m/%d/%Y"
 label .l1 -text "Enter a date:"   -anchor e
 label .l2 -text "That date is a:" -anchor e
 label .l3 -textvariable myDate2 -relief sunken -width 12

 grid .l1 .df -sticky ew
 grid .l2 .l3 -sticky ew
 focus .df
}]
[vset CATEGORY datefield]
[include ../../support/devel/doc/feedback.inc]
[manpage_end]