Tk Library Source Code

Check-in [a440495ea8]
Login
Bounty program for improvements to Tcl and certain Tcl packages.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: * doc/*.html: Bumped the version number to 3.10; various improvements.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a440495ea847fea80c01897807156e1fbb99f29272fc0ff23496ca664256409d
User & Date: csaba 2019-10-21 13:30:45
Context
2019-10-21
17:19
* scripts/scrollableframe.tcl: Minor improvement. * doc/scrollableframe.html: Minor correction. check-in: 3257c94cda user: csaba tags: trunk
13:30
* doc/*.html: Bumped the version number to 3.10; various improvements. check-in: a440495ea8 user: csaba tags: trunk
13:29
* doc/stylesheet.css: Updated. check-in: 87ce388a38 user: csaba tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/mentry/doc/index.html.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<html>
<head>
  <title>The Multi-Entry Widget Package Mentry 3.9</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, widget, entry, label">
</head>

<body bgcolor="#FFFFFF">
  <div align="center">
    <h1>The Multi-Entry Widget Package Mentry 3.9</h1>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
>


|





|

|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<html>
<head>
  <title>The Multi-Entry Widget Package Mentry 3.10</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, widget, entry, label">
</head>

<body>
  <div align="center">
    <h1>The Multi-Entry Widget Package Mentry 3.10</h1>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>

Changes to modules/mentry/doc/mentry.html.


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
..
52
53
54
55
56
57
58

59
60
61
62
63
64
65
...
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
...
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
...
381
382
383
384
385
386
387

388
389
390
391
392
393
394
...
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410

411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
...
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492

493
494
495
496
497
498
499

500
501
502
503
504
505
506
507
508
...
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528

529
530
531
532
533

534
535
536
537
538
539
540
541
542
543
544
545
546
547

548
549
550
551
552
553
554
555
556
557
...
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
...
623
624
625
626
627
628
629
630

631
632
633
634
635
636
637

638
639
640
641
642
643
644
645

646
647
648
649
650
651
652
653
654

655
656
657
658
659
660
661
662
663
664
665
666
667
668

669
670
671
672
673
674
675
676
677
...
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702

703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
...
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755

756
757
758
759
760
761
762
763

764
765
766
767
768
769
770
771
772
773
774

775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797

798
799
800
801
802

803
804
805
806
807
808
809
810
811
812

813
814
815
816
817
818
819
820
821
822
...
883
884
885
886
887
888
889
890

891
892
893
894
895

896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
...
918
919
920
921
922
923
924
925

926
927
928
929
930
931
932
933
934
...
953
954
955
956
957
958
959
960

961
962
963
964
965
966
967
968
969
...
995
996
997
998
999
1000
1001
1002

1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
....
1027
1028
1029
1030
1031
1032
1033
1034

1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050

1051
1052
1053
1054
1055
1056
1057
1058
1059
....
1067
1068
1069
1070
1071
1072
1073
1074

1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089

1090
1091
1092
1093
1094
1095
1096
1097
1098
....
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120

1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133

1134
1135
1136
1137
1138
1139
1140
1141

1142
1143
1144
1145
1146
1147
1148
1149
1150

1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164

1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
<html>
<head>
  <title>Mentry Programmer's Guide</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, widget, entry, label">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body bgcolor="#FFFFFF">
  <div align="center">
    <h1>Mentry Programmer's Guide</h1>

    <h2>For Mentry Version 3.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <h4><a href="#overview">Overview</a></h4>

  <ul>
................................................................................

    <li><a href="#ex_tile">Tile-Based Demo Scripts</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="overview">Overview</h2>

  <h3 id="ov_what">What Is Mentry?</h3>

  <p>Mentry is a library package for Tcl/Tk versions 8.0 or higher, written in
................................................................................
  <p>you can make sure that the three entries will only accept numeric input,
  thus providing a comfortable and safe user interface for editing 10-digit
  phone numbers.</p>

  <h3 id="ov_get">How to Get It?</h3>

  <p>Mentry is available for free download from the same URL as Wcb.&nbsp; The
  distribution file is <code>mentry3.9.tar.gz</code> for UNIX and
  <code>mentry3_9.zip</code> for Windows.&nbsp; These files contain the same
  information, except for the additional carriage return character preceding
  the linefeed at the end of each line in the text files for Windows.</p>

  <p>Mentry is also included in tklib, which has the address</p>

  <blockquote>
    <address>
................................................................................
  the <code>auto_path</code> variable.&nbsp; For example, you can install it as
  a directory at the same level as the Tcl and Tk script libraries.&nbsp; The
  locations of these library directories are given by the
  <code>tcl_library</code> and <code>tk_library</code> variables,
  respectively.</p>

  <p>To install Mentry <i>on UNIX</i>, <code>cd</code> to the desired directory
  and unpack the distribution file <code>mentry3.9.tar.gz</code>:</p>

  <blockquote>
    <pre>
gunzip -c mentry3.9.tar.gz | tar -xf -
</pre>
  </blockquote>

  <p>On most UNIX systems this can be replaced with</p>

  <blockquote>
    <pre>
tar -zxf mentry3.9.tar.gz
</pre>
  </blockquote>

  <p>Both commands will create a directory named <code>mentry3.9</code>, with
  the subdirectories <code>demos</code>, <code>doc</code>, and
  <code>scripts</code>.</p>

  <p><i>On Windows</i>, use WinZip or some other program capable of unpacking
  the distribution file <code>mentry3_9.zip</code> into the directory
  <code>mentry3.9</code>, with the subdirectories <code>demos</code>,
  <code>doc</code>, and <code>scripts</code>.</p>

  <p>The file <code>mentryThemes.tcl</code> in the <code>scripts</code>
  directory is only needed for applications using the package Mentry_tile (see
  next section).</p>

  <p>Notice that in tklib the Mentry <code>demos</code> directory is replaced
................................................................................
  0.4 or higher, and <code>tileqt</code> itself won't work with tile versions
  earlier than 0.7.</p>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="examples">Examples</h2>

  <h3 id="ex_phoneNumber">A mentry Widget for Phone Numbers</h3>

  <p>Let's resume the <a href="#ov_example">example</a> mentioned in the
................................................................................
  Overview in a bit more systematical manner.&nbsp; First, we will write a
  procedure for creating a mentry widget that allows to display and edit
  10-digit phone numbers and accepts any configuration options supported by the
  <code><a href="mentryWidget.html">mentry::mentry</a></code> command:</p>

  <blockquote>
    <pre>
#------------------------------------------------------------------------------
# phoneNumberMentry
#
# Creates a new mentry widget win that allows to display and edit 10-digit
# phone numbers.  Sets the type attribute of the widget to PhoneNumber and
# returns the name of the newly created widget.
#------------------------------------------------------------------------------
proc phoneNumberMentry {win args} {
    #

    # Create a mentry widget consisting of two entries of width 3 and one of
    # width 4, separated by "-" characters, and set its type to PhoneNumber
    #
    eval [list mentry::mentry $win] $args
    $win configure -body {3 - 3 - 4}
    $win attrib type PhoneNumber

    #
    # Allow only decimal digits in all entry children; use
    # wcb::cbappend (or wcb::cbprepend) instead of wcb::callback
    # in order to keep the wcb::checkEntryLen callback,
    # registered by mentry::mentry for all entry children
    #
    for {set n 0} {$n &lt; 3} {incr n} {
        wcb::cbappend [$win entrypath $n] before insert wcb::checkStrForNum
        $win adjustentry $n "0123456789"
    }

    return $win
}
................................................................................
  characters specified by that string.</p>

  <p>Our second procedure outputs a phone number to a mentry widget having a
  <code>type</code> attribute value of <code>"PhoneNumber"</code>:</p>

  <blockquote>
    <pre>
#------------------------------------------------------------------------------
# putPhoneNumber
#
# Outputs the phone number num to the mentry widget win of type PhoneNumber.
# The phone number must be a string of length 10, consisting of decimal digits.
#------------------------------------------------------------------------------
proc putPhoneNumber {num win} {
    #

    # Check the syntax of num
    #
    if {[string length $num] != 10 || ![regexp {^[0-9]*$} $num]} {
        return -code error "expected 10 decimal digits but got \"$num\""
    } 

    #

    # Check the widget and display the properly formatted phone number
    #
    checkIfPhoneNumberMentry $win
    $win put 0 [string range $num 0 2] [string range $num 3 5] \
               [string range $num 6 9]
}
</pre>
  </blockquote>

................................................................................

  <p>Next, we need a procedure that returns the phone number contained in a
  mentry widget having a <code>type</code> attribute value of
  <code>"PhoneNumber"</code>:</p>

  <blockquote>
    <pre>
#------------------------------------------------------------------------------
# getPhoneNumber
#
# Returns the phone number contained in the mentry widget win of type
# PhoneNumber.
#------------------------------------------------------------------------------
proc getPhoneNumber win {
    #

    # Check the widget
    #
    checkIfPhoneNumberMentry $win

    #

    # Generate an error if any entry child is empty or incomplete
    #
    for {set n 0} {$n &lt; 3} {incr n} {
        if {[$win isempty $n]} {
            focus [$win entrypath $n]
            return -code error EMPTY
        }
        if {![$win isfull $n]} {
            focus [$win entrypath $n]
            return -code error INCOMPL
        }
    }

    #

    # Return the phone number built from the
    # values contained in the entry children
    #
    $win getarray strs
    return $strs(0)$strs(1)$strs(2)
}
</pre>
  </blockquote>

  <p>The procedure runs over the indices of the entry children of the given
................................................................................

  <p>The last two procedures presented above contain an invocation of the
  command <code>checkIfPhoneNumberMentry</code>, which is implemented as
  folows:</p>

  <blockquote>
    <pre>
#------------------------------------------------------------------------------
# checkIfPhoneNumberMentry
#
# Generates an error if win is not a mentry widget of type PhoneNumber.
#------------------------------------------------------------------------------
proc checkIfPhoneNumberMentry win {
    if {![winfo exists $win]} {
        return -code error "bad window path name \"$win\""
    }

    if {[string compare [winfo class $win] "Mentry"] != 0 ||
        [string compare [$win attrib type] "PhoneNumber"] != 0} {
................................................................................
  <blockquote>
    <pre>
package require mentry

set title "Phone Number"
wm title . $title

#

# Add some entries to the Tk option database
#
source [file join [file dirname [info script]] option.tcl]

. . .

#

# Frame .f with a mentry displaying a phone number
#
frame .f
label .f.l -text "A mentry widget for phone numbers:"
phoneNumberMentry .f.me -background white
pack .f.l .f.me

#

# Message strings corresponding to the values
# returned by getPhoneNumber on failure
#
array set msgs {
    EMPTY       "Field value missing"
    INCOMPL     "Incomplete field value"
}

#

# Button .get invoking the procedure getPhoneNumber
#
button .get -text "Get from mentry" -command {
    if {[catch {
        set num ""
        set num [getPhoneNumber .f.me]
    } result] != 0} {
        bell
        tk_messageBox -icon error -message $msgs($result) \
                      -title $title -type ok
    }
}

#

# Label .num displaying the result of getPhoneNumber
#
label .num -textvariable num -background white

. . .

putPhoneNumber 1234567890 .f.me
focus [.f.me entrypath 0]
</pre>
................................................................................
  implements the procedures <code>ethernetAddrMentry</code>,
  <code>putEthernetAddr</code>, and <code>getEthernetAddr</code>; the last two
  invoke the helper procedure <code>checkIfEthernetAddrMentry</code>, while the
  first one is implemented as follows:</p>

  <blockquote>
    <pre>
#------------------------------------------------------------------------------
# ethernetAddrMentry
#   
# Creates a new mentry widget win that allows to display and edit Ethernet
# addresses.  Sets the type attribute of the widget to EthernetAddr and returns
# the name of the newly created widget.
#------------------------------------------------------------------------------
proc ethernetAddrMentry {win args} {
    #

    # Create a mentry widget consisting of 6 entry children of
    # width 2, separated by colons, and set its type to EthernetAddr
    #
    eval [list mentry::mentry $win] $args
    $win configure -body {2 : 2 : 2 : 2 : 2 : 2}
    $win attrib type EthernetAddr

    #
    # Install automatic uppercase conversion and allow only hexadecimal
    # digits in all entry children; use wcb::cbappend (or wcb::cbprepend)
    # instead of wcb::callback in order to keep the wcb::checkEntryLen
    # callback, registered by mentry::mentry for all entry children
    #
    for {set n 0} {$n &lt; 6} {incr n} {
        wcb::cbappend [$win entrypath $n] before insert wcb::convStrToUpper \
                      {wcb::checkStrForRegExp {^[0-9A-F]*$}}
        $win adjustentry $n "0123456789ABCDEF"
    }
    
    return $win
................................................................................
  <p>The procedure <code>putEthernetAddr</code> expects as its first argument a
  string of the form <code>"XX:XX:XX:XX:XX:XX"</code>, where each
  <code>"XX"</code> must be a hexadecimal string in the range <code>0</code> -
  <code>255</code>:</p>

  <blockquote>
    <pre>
#------------------------------------------------------------------------------
# putEthernetAddr
#
# Outputs the Ethernet address addr to the mentry widget win of type
# EthernetAddr.  The address must be a string of the form XX:XX:XX:XX:XX:XX,
# where each XX must be a hexadecimal string in the range 0 - 255.  Leading
# zeros are allowed (but not required), hence the components may have more (but
# also less) than two characters; the procedure displays them with exactly two
# digits.
#------------------------------------------------------------------------------
proc putEthernetAddr {addr win} {
    set errorMsg "expected an Ethernet address but got \"$addr\""

    #

    # Check the syntax of addr
    #
    set lst [split $addr :]
    if {[llength $lst] != 6} {
        return -code error $errorMsg
    }

    #

    # Try to convert the 6 components of addr to hexadecimal
    # strings and check whether they are in the range 0 - 255
    #
    for {set n 0} {$n &lt; 6} {incr n} {
        set val 0x[lindex $lst $n]
        if {[catch {format "%02X" $val} str$n] != 0 || $val &lt; 0 || $val &gt; 255} {
            return -code error $errorMsg
        }
    }

    #

    # Check the widget and display the properly formatted Ethernet address
    #
    checkIfEthernetAddrMentry $win
    $win put 0 $str0 $str1 $str2 $str3 $str4 $str5
}
</pre>
  </blockquote>

  <p>The procedure <code>getEthernetAddr</code> raises an error if any entry
  child of the given mentry widget is empty.&nbsp; It accepts also entry
  strings of length one, but in the return value all components will have
  exactly two digits:</p>

  <blockquote>
    <pre>
#------------------------------------------------------------------------------
# getEthernetAddr
#
# Returns the Ethernet address contained in the mentry widget win of type
# EthernetAddr.
#------------------------------------------------------------------------------
proc getEthernetAddr win {
    #

    # Check the widget
    #
    checkIfEthernetAddrMentry $win

    #

    # Generate an error if any entry child is empty
    #
    for {set n 0} {$n &lt; 6} {incr n} {
        if {[$win isempty $n]} {
            focus [$win entrypath $n]
            return -code error EMPTY
        }
    }

    #

    # Return the properly formatted Ethernet address built
    # from the values contained in the entry children
    #
    $win getarray strs
    return [format "%02X:%02X:%02X:%02X:%02X:%02X" \
            0x$strs(0) 0x$strs(1) 0x$strs(2) 0x$strs(3) 0x$strs(4) 0x$strs(5)]
}
</pre>
  </blockquote>

................................................................................
  <blockquote>
    <pre>
package require mentry

set title "Date & Time"
wm title . $title 

#

# Add some entries to the Tk option database
#
source [file join [file dirname [info script]] option.tcl]
    
#   

# Date and time formats supported by this demo
# script and the corresponding field separators
#
array set dateFmts {0 mdy  1 dmy  2 Ymd}
array set dateSeps {0 /    1 .    2 -  }
array set timeFmts {0 IMS  1 HMS}
array set timeSeps {0 :    1 :  }

#
# Choose the date & time formats; don't use the %p field descriptor
# for displaying the AM/PM indicator, because it doesn't work on
# UNIX if Tcl/Tk 8.4 or higher is used in a non-default locale
#
wm withdraw .
set clockVal [clock seconds]
if {[clock format $clockVal -format "%H"] &lt; 12} {
    set meridian AM
} else {
    set meridian PM
}
................................................................................
                       [clock format $clockVal -format "%d.%m.%y"] \ 
                       [clock format $clockVal -format "%Y-%m-%d"]]
set timeIdx [tk_dialog .choice $title "Please choose a time format" {} -1 \
                       [clock format $clockVal -format "%I:%M:%S $meridian"] \
                       [clock format $clockVal -format "%H:%M:%S"]]
wm deiconify .

#   

# Frame .f with mentries displaying the date & time
#   
frame .f
label .f.lDate -text "Date: "
mentry::dateMentry .f.date $dateFmts($dateIdx) $dateSeps($dateIdx) \ 
                   -justify center -background white
frame .f.gap -width 10
label .f.lTime -text "Time: "
mentry::timeMentry .f.time $timeFmts($timeIdx) $timeSeps($timeIdx) \
................................................................................

  <p>The demo script <code>datetime2.tcl</code> displays both the date and time
  in the same mentry widget, with the aid of the third command described
  above:</p>

  <blockquote>
    <pre>
#

# Frame .f with a mentry displaying the date & time
#
frame .f
label .f.l -text "Date & time: "
mentry::dateTimeMentry .f.me $dateFmts($dateIdx)$timeFmts($timeIdx) \
                       $dateSeps($dateIdx) $timeSeps($timeIdx) \
                       -justify center -background white
pack .f.l .f.me
</pre>
................................................................................
    <i>boolean</i></code>.&nbsp; On failure, the procedure sets the focus to
    the first erronous entry child, generates an error, and returns one of the
    values contained in the following code fragment taken from the scripts
    <code>datetime1.tcl</code> and <code>datetime2.tcl</code>:

      <blockquote>
        <pre>
#

# Message strings corresponding to the values
# returned by mentry::getClockVal on failure
#
array set msgs {
    EMPTY       "Field value missing"
    BAD         "Invalid field value"
    BAD_DATE    "Invalid date"
    BAD_YEAR    "Unsupported year"
}
</pre>
................................................................................
  </ul>

  <p>The demo script <code>datetime1.tcl</code> invokes the last two commands
  as follows:</p>

  <blockquote>
    <pre>
#

# Button .get invoking the procedure mentry::getClockVal
#
button .get -text "Get from mentries" -command {
    if {[catch {
        set dateTime ""
        set base [mentry::getClockVal .f.date]
        set clockVal [mentry::getClockVal .f.time -base $base]
        set dateTime [clock format $clockVal -format "%c"]
    } result] != 0} {
        bell
        tk_messageBox -icon error -message $msgs($result) \
                      -title $title -type ok
    }
}

#

# Label .dateTime displaying the result of mentry::getClockVal
#
label .dateTime -textvariable dateTime -background white

. . .

set clockVal [clock seconds]
mentry::putClockVal $clockVal .f.date
mentry::putClockVal $clockVal .f.time
................................................................................
  of the <code>-base</code> option when passing the name of the time mentry to
  the same procedure.</p>

  <p>The demo script <code>datetime2.tcl</code> is simpler:</p>

  <blockquote>
    <pre>
#

# Button .get invoking the procedure mentry::getClockVal
#
button .get -text "Get from mentry" -command {
    if {[catch {
        set dateTime ""
        set clockVal [mentry::getClockVal .f.me]
        set dateTime [clock format $clockVal -format "%c"]
    } result] != 0} {
        bell
        tk_messageBox -icon error -message $msgs($result) \
                      -title $title -type ok
    }
}

#

# Label .dateTime displaying the result of mentry::getClockVal
#
label .dateTime -textvariable dateTime -background white

. . .

set clockVal [clock seconds]
mentry::putClockVal $clockVal .f.me
focus [.f.me entrypath 0]
................................................................................
  <p>The Mentry distribution contains also tile-based counterparts of the demo
  scripts discussed above.&nbsp; As described in the <a href="#ov_tile">More on
  Mentry_tile</a> section of this tutorial, it is quite easy to port an
  application using the Mentry package to one based on Mentry_tile.&nbsp; For
  example, let's see how to transform the demo script
  <code>phonenumber.tcl</code> into a tile-based one, called
  <code>phonenumber_tile.tcl</code>.&nbsp; The changes are shown below in
  <span>red</span> color:</p>

  <blockquote>
    <pre>
package require mentry<span>_tile</span>

set title "Phone Number"
wm title . $title

#

# Add some entries to the Tk option database
#
source [file join [file dirname [info script]] option<span>_tile</span>.tcl]

. . .

<span>#
# Improve the window's appearance by using a tile
# frame as a container for the other widgets
#
ttk::frame .base</span>

#

# Frame <span>.base</span>.f with a mentry displaying a phone number
#
<span>ttk::</span>frame .base.f
<span>ttk::</span>label .base.f.l -text "A mentry widget for phone numbers:"
phoneNumberMentry <span>.base</span>.f.me
pack <span>.base</span>.f.l <span>.base</span>.f.me

#

# Message strings corresponding to the values
# returned by getPhoneNumber on failure
#
array set msgs {
    EMPTY       "Field value missing"
    INCOMPL     "Incomplete field value"
}

#

# Button <span>.base</span>.get invoking the procedure getPhoneNumber
#
<span>ttk</span>::button <span>.base</span>.get -text "Get from mentry" -command {
    if {[catch {
        set num ""
        set num [getPhoneNumber <span>.base</span>.f.me]
    } result] != 0} {
        bell
        tk_messageBox -icon error -message $msgs($result) \
                      -title $title -type ok
    }
}

#

# Label <span>.base</span>.num displaying the result of getPhoneNumber
#
<span>ttk::</span>label <span>.base</span>.num -textvariable num -background white

. . .

putPhoneNumber 1234567890 <span>.base</span>.f.me
focus [<span>.base</span>.f.me entrypath 0]
</pre>
  </blockquote>

  <p>That's all!&nbsp; The resulting window has a nice theme-specific
  appearance:</p>

  <blockquote>
>










|



|









>







 







>







 







|
|







 







|



|







|



|




|
|







 







>







 







|





|

<
>


|




|




|







 







|




|

<
>

|




<
>

|







 







|




|

<
>

|


<
>

|











<
>


|







 







|



|







 







<
>

|




<
>

|





<
>


|





<
>

|











<
>

|







 







|





|

<
>


|




|




|







 







|








|



<
>

|





<
>


|







<
>

|













|




|

<
>

|


<
>

|







<
>


|







 







<
>

|


<
>


|





|



|







 







<
>

|







 







<
>

|







 







<
>


|







 







<
>

|













<
>

|







 







<
>

|












<
>

|







 







|



|




<
>

|
|



|





<
>
|
|
|
|
|
|

<
>


|





<
>
|
|
|


|







<
>
|
|
|



|
|







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
..
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
...
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
...
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
...
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
...
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413

414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
...
482
483
484
485
486
487
488
489
490
491
492
493
494
495

496
497
498
499
500
501
502

503
504
505
506
507
508
509
510
511
512
...
518
519
520
521
522
523
524
525
526
527
528
529
530
531

532
533
534
535
536

537
538
539
540
541
542
543
544
545
546
547
548
549
550

551
552
553
554
555
556
557
558
559
560
561
...
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
...
627
628
629
630
631
632
633

634
635
636
637
638
639
640

641
642
643
644
645
646
647
648

649
650
651
652
653
654
655
656
657

658
659
660
661
662
663
664
665
666
667
668
669
670
671

672
673
674
675
676
677
678
679
680
681
...
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705

706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
...
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758

759
760
761
762
763
764
765
766

767
768
769
770
771
772
773
774
775
776
777

778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800

801
802
803
804
805

806
807
808
809
810
811
812
813
814
815

816
817
818
819
820
821
822
823
824
825
826
...
887
888
889
890
891
892
893

894
895
896
897
898

899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
...
922
923
924
925
926
927
928

929
930
931
932
933
934
935
936
937
938
...
957
958
959
960
961
962
963

964
965
966
967
968
969
970
971
972
973
...
999
1000
1001
1002
1003
1004
1005

1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
....
1031
1032
1033
1034
1035
1036
1037

1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053

1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
....
1071
1072
1073
1074
1075
1076
1077

1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092

1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
....
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123

1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136

1137
1138
1139
1140
1141
1142
1143
1144

1145
1146
1147
1148
1149
1150
1151
1152
1153

1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167

1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
<!DOCTYPE html>
<html>
<head>
  <title>Mentry Programmer's Guide</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, widget, entry, label">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Mentry Programmer's Guide</h1>

    <h2>For Mentry Version 3.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <h4><a href="#overview">Overview</a></h4>

  <ul>
................................................................................

    <li><a href="#ex_tile">Tile-Based Demo Scripts</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="overview">Overview</h2>

  <h3 id="ov_what">What Is Mentry?</h3>

  <p>Mentry is a library package for Tcl/Tk versions 8.0 or higher, written in
................................................................................
  <p>you can make sure that the three entries will only accept numeric input,
  thus providing a comfortable and safe user interface for editing 10-digit
  phone numbers.</p>

  <h3 id="ov_get">How to Get It?</h3>

  <p>Mentry is available for free download from the same URL as Wcb.&nbsp; The
  distribution file is <code>mentry3.10.tar.gz</code> for UNIX and
  <code>mentry3_10.zip</code> for Windows.&nbsp; These files contain the same
  information, except for the additional carriage return character preceding
  the linefeed at the end of each line in the text files for Windows.</p>

  <p>Mentry is also included in tklib, which has the address</p>

  <blockquote>
    <address>
................................................................................
  the <code>auto_path</code> variable.&nbsp; For example, you can install it as
  a directory at the same level as the Tcl and Tk script libraries.&nbsp; The
  locations of these library directories are given by the
  <code>tcl_library</code> and <code>tk_library</code> variables,
  respectively.</p>

  <p>To install Mentry <i>on UNIX</i>, <code>cd</code> to the desired directory
  and unpack the distribution file <code>mentry3.10.tar.gz</code>:</p>

  <blockquote>
    <pre>
gunzip -c mentry3.10.tar.gz | tar -xf -
</pre>
  </blockquote>

  <p>On most UNIX systems this can be replaced with</p>

  <blockquote>
    <pre>
tar -zxf mentry3.10.tar.gz
</pre>
  </blockquote>

  <p>Both commands will create a directory named <code>mentry3.10</code>, with
  the subdirectories <code>demos</code>, <code>doc</code>, and
  <code>scripts</code>.</p>

  <p><i>On Windows</i>, use WinZip or some other program capable of unpacking
  the distribution file <code>mentry3_10.zip</code> into the directory
  <code>mentry3.10</code>, with the subdirectories <code>demos</code>,
  <code>doc</code>, and <code>scripts</code>.</p>

  <p>The file <code>mentryThemes.tcl</code> in the <code>scripts</code>
  directory is only needed for applications using the package Mentry_tile (see
  next section).</p>

  <p>Notice that in tklib the Mentry <code>demos</code> directory is replaced
................................................................................
  0.4 or higher, and <code>tileqt</code> itself won't work with tile versions
  earlier than 0.7.</p>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="examples">Examples</h2>

  <h3 id="ex_phoneNumber">A mentry Widget for Phone Numbers</h3>

  <p>Let's resume the <a href="#ov_example">example</a> mentioned in the
................................................................................
  Overview in a bit more systematical manner.&nbsp; First, we will write a
  procedure for creating a mentry widget that allows to display and edit
  10-digit phone numbers and accepts any configuration options supported by the
  <code><a href="mentryWidget.html">mentry::mentry</a></code> command:</p>

  <blockquote>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
# phoneNumberMentry
#
# Creates a new mentry widget win that allows to display and edit 10-digit
# phone numbers.  Sets the type attribute of the widget to PhoneNumber and
# returns the name of the newly created widget.
#------------------------------------------------------------------------------</span>
proc phoneNumberMentry {win args} {

    <span class="cmt">#
    # Create a mentry widget consisting of two entries of width 3 and one of
    # width 4, separated by "-" characters, and set its type to PhoneNumber
    #</span>
    eval [list mentry::mentry $win] $args
    $win configure -body {3 - 3 - 4}
    $win attrib type PhoneNumber

    <span class="cmt">#
    # Allow only decimal digits in all entry children; use
    # wcb::cbappend (or wcb::cbprepend) instead of wcb::callback
    # in order to keep the wcb::checkEntryLen callback,
    # registered by mentry::mentry for all entry children
    #</span>
    for {set n 0} {$n &lt; 3} {incr n} {
        wcb::cbappend [$win entrypath $n] before insert wcb::checkStrForNum
        $win adjustentry $n "0123456789"
    }

    return $win
}
................................................................................
  characters specified by that string.</p>

  <p>Our second procedure outputs a phone number to a mentry widget having a
  <code>type</code> attribute value of <code>"PhoneNumber"</code>:</p>

  <blockquote>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
# putPhoneNumber
#
# Outputs the phone number num to the mentry widget win of type PhoneNumber.
# The phone number must be a string of length 10, consisting of decimal digits.
#------------------------------------------------------------------------------</span>
proc putPhoneNumber {num win} {

    <span class="cmt">#
    # Check the syntax of num
    #</span>
    if {[string length $num] != 10 || ![regexp {^[0-9]*$} $num]} {
        return -code error "expected 10 decimal digits but got \"$num\""
    } 


    <span class="cmt">#
    # Check the widget and display the properly formatted phone number
    #</span>
    checkIfPhoneNumberMentry $win
    $win put 0 [string range $num 0 2] [string range $num 3 5] \
               [string range $num 6 9]
}
</pre>
  </blockquote>

................................................................................

  <p>Next, we need a procedure that returns the phone number contained in a
  mentry widget having a <code>type</code> attribute value of
  <code>"PhoneNumber"</code>:</p>

  <blockquote>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
# getPhoneNumber
#
# Returns the phone number contained in the mentry widget win of type
# PhoneNumber.
#------------------------------------------------------------------------------</span>
proc getPhoneNumber win {

    <span class="cmt">#
    # Check the widget
    #</span>
    checkIfPhoneNumberMentry $win


    <span class="cmt">#
    # Generate an error if any entry child is empty or incomplete
    #</span>
    for {set n 0} {$n &lt; 3} {incr n} {
        if {[$win isempty $n]} {
            focus [$win entrypath $n]
            return -code error EMPTY
        }
        if {![$win isfull $n]} {
            focus [$win entrypath $n]
            return -code error INCOMPL
        }
    }


    <span class="cmt">#
    # Return the phone number built from the
    # values contained in the entry children
    #</span>
    $win getarray strs
    return $strs(0)$strs(1)$strs(2)
}
</pre>
  </blockquote>

  <p>The procedure runs over the indices of the entry children of the given
................................................................................

  <p>The last two procedures presented above contain an invocation of the
  command <code>checkIfPhoneNumberMentry</code>, which is implemented as
  folows:</p>

  <blockquote>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
# checkIfPhoneNumberMentry
#
# Generates an error if win is not a mentry widget of type PhoneNumber.
#------------------------------------------------------------------------------</span>
proc checkIfPhoneNumberMentry win {
    if {![winfo exists $win]} {
        return -code error "bad window path name \"$win\""
    }

    if {[string compare [winfo class $win] "Mentry"] != 0 ||
        [string compare [$win attrib type] "PhoneNumber"] != 0} {
................................................................................
  <blockquote>
    <pre>
package require mentry

set title "Phone Number"
wm title . $title


<span class="cmt">#
# Add some entries to the Tk option database
#</span>
source [file join [file dirname [info script]] option.tcl]

. . .


<span class="cmt">#
# Frame .f with a mentry displaying a phone number
#</span>
frame .f
label .f.l -text "A mentry widget for phone numbers:"
phoneNumberMentry .f.me -background white
pack .f.l .f.me


<span class="cmt">#
# Message strings corresponding to the values
# returned by getPhoneNumber on failure
#</span>
array set msgs {
    EMPTY       "Field value missing"
    INCOMPL     "Incomplete field value"
}


<span class="cmt">#
# Button .get invoking the procedure getPhoneNumber
#</span>
button .get -text "Get from mentry" -command {
    if {[catch {
        set num ""
        set num [getPhoneNumber .f.me]
    } result] != 0} {
        bell
        tk_messageBox -icon error -message $msgs($result) \
                      -title $title -type ok
    }
}


<span class="cmt">#
# Label .num displaying the result of getPhoneNumber
#</span>
label .num -textvariable num -background white

. . .

putPhoneNumber 1234567890 .f.me
focus [.f.me entrypath 0]
</pre>
................................................................................
  implements the procedures <code>ethernetAddrMentry</code>,
  <code>putEthernetAddr</code>, and <code>getEthernetAddr</code>; the last two
  invoke the helper procedure <code>checkIfEthernetAddrMentry</code>, while the
  first one is implemented as follows:</p>

  <blockquote>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
# ethernetAddrMentry
#   
# Creates a new mentry widget win that allows to display and edit Ethernet
# addresses.  Sets the type attribute of the widget to EthernetAddr and returns
# the name of the newly created widget.
#------------------------------------------------------------------------------</span>
proc ethernetAddrMentry {win args} {

    <span class="cmt">#
    # Create a mentry widget consisting of 6 entry children of
    # width 2, separated by colons, and set its type to EthernetAddr
    #</span>
    eval [list mentry::mentry $win] $args
    $win configure -body {2 : 2 : 2 : 2 : 2 : 2}
    $win attrib type EthernetAddr

    <span class="cmt">#
    # Install automatic uppercase conversion and allow only hexadecimal
    # digits in all entry children; use wcb::cbappend (or wcb::cbprepend)
    # instead of wcb::callback in order to keep the wcb::checkEntryLen
    # callback, registered by mentry::mentry for all entry children
    #</span>
    for {set n 0} {$n &lt; 6} {incr n} {
        wcb::cbappend [$win entrypath $n] before insert wcb::convStrToUpper \
                      {wcb::checkStrForRegExp {^[0-9A-F]*$}}
        $win adjustentry $n "0123456789ABCDEF"
    }
    
    return $win
................................................................................
  <p>The procedure <code>putEthernetAddr</code> expects as its first argument a
  string of the form <code>"XX:XX:XX:XX:XX:XX"</code>, where each
  <code>"XX"</code> must be a hexadecimal string in the range <code>0</code> -
  <code>255</code>:</p>

  <blockquote>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
# putEthernetAddr
#
# Outputs the Ethernet address addr to the mentry widget win of type
# EthernetAddr.  The address must be a string of the form XX:XX:XX:XX:XX:XX,
# where each XX must be a hexadecimal string in the range 0 - 255.  Leading
# zeros are allowed (but not required), hence the components may have more (but
# also less) than two characters; the procedure displays them with exactly two
# digits.
#------------------------------------------------------------------------------</span>
proc putEthernetAddr {addr win} {
    set errorMsg "expected an Ethernet address but got \"$addr\""


    <span class="cmt">#
    # Check the syntax of addr
    #</span>
    set lst [split $addr :]
    if {[llength $lst] != 6} {
        return -code error $errorMsg
    }


    <span class="cmt">#
    # Try to convert the 6 components of addr to hexadecimal
    # strings and check whether they are in the range 0 - 255
    #</span>
    for {set n 0} {$n &lt; 6} {incr n} {
        set val 0x[lindex $lst $n]
        if {[catch {format "%02X" $val} str$n] != 0 || $val &lt; 0 || $val &gt; 255} {
            return -code error $errorMsg
        }
    }


    <span class="cmt">#
    # Check the widget and display the properly formatted Ethernet address
    #</span>
    checkIfEthernetAddrMentry $win
    $win put 0 $str0 $str1 $str2 $str3 $str4 $str5
}
</pre>
  </blockquote>

  <p>The procedure <code>getEthernetAddr</code> raises an error if any entry
  child of the given mentry widget is empty.&nbsp; It accepts also entry
  strings of length one, but in the return value all components will have
  exactly two digits:</p>

  <blockquote>
    <pre>
<span class="cmt">#------------------------------------------------------------------------------
# getEthernetAddr
#
# Returns the Ethernet address contained in the mentry widget win of type
# EthernetAddr.
#------------------------------------------------------------------------------</span>
proc getEthernetAddr win {

    <span class="cmt">#
    # Check the widget
    #</span>
    checkIfEthernetAddrMentry $win


    <span class="cmt">#
    # Generate an error if any entry child is empty
    #</span>
    for {set n 0} {$n &lt; 6} {incr n} {
        if {[$win isempty $n]} {
            focus [$win entrypath $n]
            return -code error EMPTY
        }
    }


    <span class="cmt">#
    # Return the properly formatted Ethernet address built
    # from the values contained in the entry children
    #</span>
    $win getarray strs
    return [format "%02X:%02X:%02X:%02X:%02X:%02X" \
            0x$strs(0) 0x$strs(1) 0x$strs(2) 0x$strs(3) 0x$strs(4) 0x$strs(5)]
}
</pre>
  </blockquote>

................................................................................
  <blockquote>
    <pre>
package require mentry

set title "Date & Time"
wm title . $title 


<span class="cmt">#
# Add some entries to the Tk option database
#</span>
source [file join [file dirname [info script]] option.tcl]
    

<span class="cmt">#   
# Date and time formats supported by this demo
# script and the corresponding field separators
#</span>
array set dateFmts {0 mdy  1 dmy  2 Ymd}
array set dateSeps {0 /    1 .    2 -  }
array set timeFmts {0 IMS  1 HMS}
array set timeSeps {0 :    1 :  }

<span class="cmt">#
# Choose the date & time formats; don't use the %p field descriptor
# for displaying the AM/PM indicator, because it doesn't work on
# UNIX if Tcl/Tk 8.4 or higher is used in a non-default locale
#</span>
wm withdraw .
set clockVal [clock seconds]
if {[clock format $clockVal -format "%H"] &lt; 12} {
    set meridian AM
} else {
    set meridian PM
}
................................................................................
                       [clock format $clockVal -format "%d.%m.%y"] \ 
                       [clock format $clockVal -format "%Y-%m-%d"]]
set timeIdx [tk_dialog .choice $title "Please choose a time format" {} -1 \
                       [clock format $clockVal -format "%I:%M:%S $meridian"] \
                       [clock format $clockVal -format "%H:%M:%S"]]
wm deiconify .


<span class="cmt">#   
# Frame .f with mentries displaying the date & time
#</span>   
frame .f
label .f.lDate -text "Date: "
mentry::dateMentry .f.date $dateFmts($dateIdx) $dateSeps($dateIdx) \ 
                   -justify center -background white
frame .f.gap -width 10
label .f.lTime -text "Time: "
mentry::timeMentry .f.time $timeFmts($timeIdx) $timeSeps($timeIdx) \
................................................................................

  <p>The demo script <code>datetime2.tcl</code> displays both the date and time
  in the same mentry widget, with the aid of the third command described
  above:</p>

  <blockquote>
    <pre>

<span class="cmt">#
# Frame .f with a mentry displaying the date & time
#</span>
frame .f
label .f.l -text "Date & time: "
mentry::dateTimeMentry .f.me $dateFmts($dateIdx)$timeFmts($timeIdx) \
                       $dateSeps($dateIdx) $timeSeps($timeIdx) \
                       -justify center -background white
pack .f.l .f.me
</pre>
................................................................................
    <i>boolean</i></code>.&nbsp; On failure, the procedure sets the focus to
    the first erronous entry child, generates an error, and returns one of the
    values contained in the following code fragment taken from the scripts
    <code>datetime1.tcl</code> and <code>datetime2.tcl</code>:

      <blockquote>
        <pre>

<span class="cmt">#
# Message strings corresponding to the values
# returned by mentry::getClockVal on failure
#</span>
array set msgs {
    EMPTY       "Field value missing"
    BAD         "Invalid field value"
    BAD_DATE    "Invalid date"
    BAD_YEAR    "Unsupported year"
}
</pre>
................................................................................
  </ul>

  <p>The demo script <code>datetime1.tcl</code> invokes the last two commands
  as follows:</p>

  <blockquote>
    <pre>

<span class="cmt">#
# Button .get invoking the procedure mentry::getClockVal
#</span>
button .get -text "Get from mentries" -command {
    if {[catch {
        set dateTime ""
        set base [mentry::getClockVal .f.date]
        set clockVal [mentry::getClockVal .f.time -base $base]
        set dateTime [clock format $clockVal -format "%c"]
    } result] != 0} {
        bell
        tk_messageBox -icon error -message $msgs($result) \
                      -title $title -type ok
    }
}


<span class="cmt">#
# Label .dateTime displaying the result of mentry::getClockVal
#</span>
label .dateTime -textvariable dateTime -background white

. . .

set clockVal [clock seconds]
mentry::putClockVal $clockVal .f.date
mentry::putClockVal $clockVal .f.time
................................................................................
  of the <code>-base</code> option when passing the name of the time mentry to
  the same procedure.</p>

  <p>The demo script <code>datetime2.tcl</code> is simpler:</p>

  <blockquote>
    <pre>

<span class="cmt">#
# Button .get invoking the procedure mentry::getClockVal
#</span>
button .get -text "Get from mentry" -command {
    if {[catch {
        set dateTime ""
        set clockVal [mentry::getClockVal .f.me]
        set dateTime [clock format $clockVal -format "%c"]
    } result] != 0} {
        bell
        tk_messageBox -icon error -message $msgs($result) \
                      -title $title -type ok
    }
}


<span class="cmt">#
# Label .dateTime displaying the result of mentry::getClockVal
#</span>
label .dateTime -textvariable dateTime -background white

. . .

set clockVal [clock seconds]
mentry::putClockVal $clockVal .f.me
focus [.f.me entrypath 0]
................................................................................
  <p>The Mentry distribution contains also tile-based counterparts of the demo
  scripts discussed above.&nbsp; As described in the <a href="#ov_tile">More on
  Mentry_tile</a> section of this tutorial, it is quite easy to port an
  application using the Mentry package to one based on Mentry_tile.&nbsp; For
  example, let's see how to transform the demo script
  <code>phonenumber.tcl</code> into a tile-based one, called
  <code>phonenumber_tile.tcl</code>.&nbsp; The changes are shown below in
  <span class="red">red</span> color:</p>

  <blockquote>
    <pre>
package require mentry<span class="red">_tile</span>

set title "Phone Number"
wm title . $title


<span class="cmt">#
# Add some entries to the Tk option database
#</span>
source [file join [file dirname [info script]] option<span class="red">_tile</span>.tcl]

. . .

<span class="red">#
# Improve the window's appearance by using a tile
# frame as a container for the other widgets
#
ttk::frame .base</span>


<span class="cmt">#
# Frame <span class="red">.base</span>.f with a mentry displaying a phone number
#</span>
<span class="red">ttk::</span>frame .base.f
<span class="red">ttk::</span>label .base.f.l -text "A mentry widget for phone numbers:"
phoneNumberMentry <span class="red">.base</span>.f.me
pack <span class="red">.base</span>.f.l <span class="red">.base</span>.f.me


<span class="cmt">#
# Message strings corresponding to the values
# returned by getPhoneNumber on failure
#</span>
array set msgs {
    EMPTY       "Field value missing"
    INCOMPL     "Incomplete field value"
}


<span class="cmt">#
# Button <span class="red">.base</span>.get invoking the procedure getPhoneNumber
#</span>
<span class="red">ttk</span>::button <span class="red">.base</span>.get -text "Get from mentry" -command {
    if {[catch {
        set num ""
        set num [getPhoneNumber <span class="red">.base</span>.f.me]
    } result] != 0} {
        bell
        tk_messageBox -icon error -message $msgs($result) \
                      -title $title -type ok
    }
}


<span class="cmt">#
# Label <span class="red">.base</span>.num displaying the result of getPhoneNumber
#</span>
<span class="red">ttk::</span>label <span class="red">.base</span>.num -textvariable num -background white

. . .

putPhoneNumber 1234567890 <span class="red">.base</span>.f.me
focus [<span class="red">.base</span>.f.me entrypath 0]
</pre>
  </blockquote>

  <p>That's all!&nbsp; The resulting window has a nice theme-specific
  appearance:</p>

  <blockquote>

Changes to modules/mentry/doc/mentryDateTime.html.


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
..
42
43
44
45
46
47
48

49
50
51
52
53
54
55
...
116
117
118
119
120
121
122

123
124
125
126
127
128
129
...
191
192
193
194
195
196
197

198
199
200
201
202
203
204
...
278
279
280
281
282
283
284

285
286
287
288
289
290
291
...
323
324
325
326
327
328
329

330
331
332
333
334
335
336
<html>
<head>
  <title>Multi-Entry Widgets for Date and Time</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, widget, date, time, clock">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body bgcolor="#FFFFFF">
  <div align="center">
    <h1>Multi-Entry Widgets for Date and Time</h1>

    <h2>For Mentry Version 3.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <ul>
    <li><a href="#dateMentry">The <code><b>mentry::dateMentry</b></code>
    Command</a></li>
................................................................................
    <li><a href="#getClockVal">The <code><b>mentry::getClockVal</b></code>
    Command</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="dateMentry">The <code><b>mentry::dateMentry</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, widget, date</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="timeMentry">The <code><b>mentry::timeMentry</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, widget, time</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="dateTimeMentry">The <code><b>mentry::dateTimeMentry</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    <dd>mentry, widget, date, time</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="putClockVal">The <code><b>mentry::putClockVal</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, widget, date, time, clock</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="getClockVal">The <code><b>mentry::getClockVal</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

>










|



|









>







 







>







 







>







 







>







 







>







 







>







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
..
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
...
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
...
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
...
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
...
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
<!DOCTYPE html>
<html>
<head>
  <title>Multi-Entry Widgets for Date and Time</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, widget, date, time, clock">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Multi-Entry Widgets for Date and Time</h1>

    <h2>For Mentry Version 3.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <ul>
    <li><a href="#dateMentry">The <code><b>mentry::dateMentry</b></code>
    Command</a></li>
................................................................................
    <li><a href="#getClockVal">The <code><b>mentry::getClockVal</b></code>
    Command</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="dateMentry">The <code><b>mentry::dateMentry</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, widget, date</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="timeMentry">The <code><b>mentry::timeMentry</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, widget, time</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="dateTimeMentry">The <code><b>mentry::dateTimeMentry</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    <dd>mentry, widget, date, time</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="putClockVal">The <code><b>mentry::putClockVal</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, widget, date, time, clock</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="getClockVal">The <code><b>mentry::getClockVal</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

Changes to modules/mentry/doc/mentryFixedPoint.html.


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
..
37
38
39
40
41
42
43

44
45
46
47
48
49
50
..
83
84
85
86
87
88
89

90
91
92
93
94
95
96
...
123
124
125
126
127
128
129

130
131
132
133
134
135
136
<html>
<head>
  <title>Multi-Entry Widgets for Real Numbers in Fixed-Point Format</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, widget, real number">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body bgcolor="#FFFFFF">
  <div align="center">
    <h1>Multi-Entry Widgets for Real Numbers<br>
    in Fixed-Point Format</h1>

    <h2>For Mentry Version 3.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:csaba.nemet[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <ul>
    <li><a href="#fixedPointMentry">The
    <code><b>mentry::fixedPointMentry</b></code> Command</a></li>
................................................................................
    <li><a href="#getReal">The <code><b>mentry::getReal</b></code>
    Command</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="fixedPointMentry">The <code><b>mentry::fixedPointMentry</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    <dd>mentry, widget, real number</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="putReal">The <code><b>mentry::putReal</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, widget, real number</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="getReal">The <code><b>mentry::getReal</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

>










|




|









>







 







>







 







>







 







>







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
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
..
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
...
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<html>
<head>
  <title>Multi-Entry Widgets for Real Numbers in Fixed-Point Format</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, widget, real number">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Multi-Entry Widgets for Real Numbers<br>
    in Fixed-Point Format</h1>

    <h2>For Mentry Version 3.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <ul>
    <li><a href="#fixedPointMentry">The
    <code><b>mentry::fixedPointMentry</b></code> Command</a></li>
................................................................................
    <li><a href="#getReal">The <code><b>mentry::getReal</b></code>
    Command</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="fixedPointMentry">The <code><b>mentry::fixedPointMentry</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    <dd>mentry, widget, real number</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="putReal">The <code><b>mentry::putReal</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, widget, real number</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="getReal">The <code><b>mentry::getReal</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

Changes to modules/mentry/doc/mentryIPAddr.html.


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
..
36
37
38
39
40
41
42

43
44
45
46
47
48
49
..
96
97
98
99
100
101
102

103
104
105
106
107
108
109
...
135
136
137
138
139
140
141

142
143
144
145
146
147
148
<html>
<head>
  <title>Multi-Entry Widgets for IP Addresses</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, widget, IP address">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body bgcolor="#FFFFFF">
  <div align="center">
    <h1>Multi-Entry Widgets for IP Addresses</h1>

    <h2>For Mentry Version 3.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <ul>
    <li><a href="#ipAddrMentry">The <code><b>mentry::ipAddrMentry</b></code>
    Command</a></li>
................................................................................
    <li><a href="#getIPAddr">The <code><b>mentry::getIPAddr</b></code>
    Command</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="ipAddrMentry">The <code><b>mentry::ipAddrMentry</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    <dd>mentry, widget, IP address</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="putIPAddr">The <code><b>mentry::putIPAddr</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, widget, IP address</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="getIPAddr">The <code><b>mentry::getIPAddr</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

>










|



|









>







 







>







 







>







 







>







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
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
..
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
...
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html>
<head>
  <title>Multi-Entry Widgets for IP Addresses</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, widget, IP address">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Multi-Entry Widgets for IP Addresses</h1>

    <h2>For Mentry Version 3.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <ul>
    <li><a href="#ipAddrMentry">The <code><b>mentry::ipAddrMentry</b></code>
    Command</a></li>
................................................................................
    <li><a href="#getIPAddr">The <code><b>mentry::getIPAddr</b></code>
    Command</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="ipAddrMentry">The <code><b>mentry::ipAddrMentry</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    <dd>mentry, widget, IP address</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="putIPAddr">The <code><b>mentry::putIPAddr</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, widget, IP address</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="getIPAddr">The <code><b>mentry::getIPAddr</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

Changes to modules/mentry/doc/mentryIPv6Addr.html.


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
..
36
37
38
39
40
41
42

43
44
45
46
47
48
49
..
98
99
100
101
102
103
104

105
106
107
108
109
110
111
...
141
142
143
144
145
146
147

148
149
150
151
152
153
154
<html>
<head>
  <title>Multi-Entry Widgets for IPv6 Addresses</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, widget, IPv6 address">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body bgcolor="#FFFFFF">
  <div align="center">
    <h1>Multi-Entry Widgets for IPv6 Addresses</h1>

    <h2>For Mentry Version 3.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <ul>
    <li><a href="#ipv6AddrMentry">The
    <code><b>mentry::ipv6AddrMentry</b></code> Command</a></li>
................................................................................
    <li><a href="#getIPv6Addr">The <code><b>mentry::getIPv6Addr</b></code>
    Command</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="ipv6AddrMentry">The <code><b>mentry::ipv6AddrMentry</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    <dd>mentry, widget, IPv6 address</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="putIPAddr">The <code><b>mentry::putIPv6Addr</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, widget, IPv6 address</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="getIPv6Addr">The <code><b>mentry::getIPv6Addr</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

>










|



|









>







 







>







 







>







 







>







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
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
...
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
...
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!DOCTYPE html>
<html>
<head>
  <title>Multi-Entry Widgets for IPv6 Addresses</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, widget, IPv6 address">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Multi-Entry Widgets for IPv6 Addresses</h1>

    <h2>For Mentry Version 3.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <ul>
    <li><a href="#ipv6AddrMentry">The
    <code><b>mentry::ipv6AddrMentry</b></code> Command</a></li>
................................................................................
    <li><a href="#getIPv6Addr">The <code><b>mentry::getIPv6Addr</b></code>
    Command</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="ipv6AddrMentry">The <code><b>mentry::ipv6AddrMentry</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    <dd>mentry, widget, IPv6 address</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="putIPAddr">The <code><b>mentry::putIPv6Addr</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, widget, IPv6 address</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="getIPv6Addr">The <code><b>mentry::getIPv6Addr</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

Changes to modules/mentry/doc/mentryThemes.html.


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
..
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
..
97
98
99
100
101
102
103

104
105
106
107
108
109
110
...
133
134
135
136
137
138
139

140
141
142
143
144
145
146
...
169
170
171
172
173
174
175

176
177
178
179
180
181
182
<html>
<head>
  <title>Commands Related to Tile Themes</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, theme, tile">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body bgcolor="#FFFFFF">
  <div align="center">
    <h1>Commands Related to Tile Themes</h1>

    <h2>For Mentry Version 3.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <ul>
    <li><a href="#overview">Overview</a></li>

................................................................................
    <li><a href="#setThemeDefaults">The
    <code><b>mentry::setThemeDefaults</b></code> Command</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="overview">Overview</h2>

  <p>The commands described in this reference page should only be invoked when
  using the package Mentry_tile.&nbsp; They enable you to set and query the
  current theme, to retrieve a list of the available themes, and to make sure
  that your widgets will have a theme-specific appearance.</p>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="setTheme">The <code><b>mentry::setTheme</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, theme, tile</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="getCurrentTheme">The <code><b>mentry::getCurrentTheme</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    <dd>mentry, theme, tile</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="getThemes">The <code><b>mentry::getThemes</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, theme, tile</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="setThemeDefaults">The <code><b>mentry::setThemeDefaults</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
>










|



|









>







 







>













>







 







>







 







>







 







>







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
..
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
...
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
...
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
...
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!DOCTYPE html>
<html>
<head>
  <title>Commands Related to Tile Themes</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, theme, tile">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Commands Related to Tile Themes</h1>

    <h2>For Mentry Version 3.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <ul>
    <li><a href="#overview">Overview</a></li>

................................................................................
    <li><a href="#setThemeDefaults">The
    <code><b>mentry::setThemeDefaults</b></code> Command</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="overview">Overview</h2>

  <p>The commands described in this reference page should only be invoked when
  using the package Mentry_tile.&nbsp; They enable you to set and query the
  current theme, to retrieve a list of the available themes, and to make sure
  that your widgets will have a theme-specific appearance.</p>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="setTheme">The <code><b>mentry::setTheme</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, theme, tile</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="getCurrentTheme">The <code><b>mentry::getCurrentTheme</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    <dd>mentry, theme, tile</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="getThemes">The <code><b>mentry::getThemes</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>mentry, theme, tile</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="setThemeDefaults">The <code><b>mentry::setThemeDefaults</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

Changes to modules/mentry/doc/mentryWidget.html.


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
..
49
50
51
52
53
54
55


56
57
58
59
60
61
62
63
...
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
...
189
190
191
192
193
194
195

196
197
198
199
200
201
202
...
207
208
209
210
211
212
213


























































214
215
216
217
218
219
220
221
...
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
...
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
...
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
...
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
...
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
...
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
...
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
<html>
<head>
  <title>The mentry::mentry Command</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, widget, entry, label">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body bgcolor="#FFFFFF">
  <div align="center">
    <h1>The <code><b>mentry::mentry</b></code> Command</h1>

    <h2>For Mentry Version 3.9</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <ul>
    <li><a href="#quick_ref">Quick Reference</a></li>

    <li><a href="#detailed_ref">Detailed Reference</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="quick_ref">Quick Reference</h2>

  <dl>
    <dt><a href="#name">NAME</a></dt>

................................................................................

    <dd>
      <pre>
<b>mentry::mentry</b> <i>pathName</i> ?<i>options</i>?
</pre>
    </dd>



    <dt><a href="#std_options">STANDARD OPTIONS</a></dt>

    <dd>
      <pre>
<b>-borderwidth          -highlightcolor      -relief
-highlightbackground  -highlightthickness</b>
</pre>
    </dd>
................................................................................

    <dd>
      <pre>
<i>number</i>  <b>end</b>
</pre>
    </dd>

    <dt><a href="#description">DESCRIPTION</a></dt>

    <dt class="tm"><a href="#widget_command">WIDGET COMMAND</a></dt>

    <dd><code><i>pathName</i> <b><a href="#adjustentry">adjustentry</a></b>
    <i>index</i> <i>string</i></code></dd>

    <dd><code><i>pathName</i> <b><a href="#attrib">attrib</a></b> ?<i>name</i>?
    ?<i>value</i> <i>name</i> <i>value</i> ...?</code></dd>
................................................................................
    <dd>mentry, widget, entry, label</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="detailed_ref">Detailed Reference</h2>

  <dl>
    <dt id="name"><b>NAME</b></dt>

................................................................................

    <dd>
      <pre>
<b>mentry::mentry</b> <i>pathName</i> ?<i>options</i>?
</pre>
    </dd>



























































    <dt id="std_options"><b>STANDARD OPTIONS</b></dt>

    <dd>
      <pre>
<b>-borderwidth          -highlightcolor      -relief
-highlightbackground  -highlightthickness</b>
</pre>
    </dd>
................................................................................

    <dt class="tm" id="widget_options"><b>WIDGET-SPECIFIC OPTIONS</b></dt>

    <dd class="tm" id="body">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>Command-Line Name:&nbsp;</td>

          <td><code><b>-body</b></code></td>
        </tr>

        <tr>
          <td>Database Name:</td>

          <td><code><b>&nbsp;body</b></code></td>
        </tr>

        <tr>
          <td>Database Class:</td>

          <td><code><b>&nbsp;Body</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>Specifies the initial widths of the entry children of the given
        multi-entry widget, as well as the texts to be displayed in the labels
................................................................................
      </blockquote>
    </dd>

    <dd id="disabledbackground">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>Command-Line Name:&nbsp;</td>

          <td><code><b>-disabledbackground</b></code></td>
        </tr>

        <tr>
          <td>Database Name:</td>

          <td><code><b>&nbsp;disabledBackground</b></code></td>
        </tr>

        <tr>
          <td>Database Class:</td>

          <td><code><b>&nbsp;DisabledBackground</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>This option, which is only supported for Tk versions 8.4 or higher,
        specifies the background color to use for all entry and label children
................................................................................
      </blockquote>
    </dd>

    <dd id="disabledforeground">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>Command-Line Name:&nbsp;</td>

          <td><code><b>-disabledforeground</b></code></td>
        </tr>

        <tr>
          <td>Database Name:</td>

          <td><code><b>&nbsp;disabledForeground</b></code></td>
        </tr>

        <tr>
          <td>Database Class:</td>

          <td><code><b>&nbsp;DisabledForeground</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>This option, which is only supported for Tk versions 8.4 or higher,
        specifies the foreground color to use for all entry and label children
................................................................................
      </blockquote>
    </dd>

    <dd id="readonlybackground">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>Command-Line Name:&nbsp;</td>

          <td><code><b>-readonlybackground</b></code></td>
        </tr>

        <tr>
          <td>Database Name:</td>

          <td><code><b>&nbsp;readonlyBackground</b></code></td>
        </tr>

        <tr>
          <td>Database Class:</td>

          <td><code><b>&nbsp;ReadonlyBackground</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>This option, which is only supported for Tk versions 8.4 or higher,
        specifies the background color to use for all entry and label children
................................................................................
      </blockquote>
    </dd>

    <dd id="takefocus">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>Command-Line Name:&nbsp;</td>

          <td><code><b>-takefocus</b></code></td>
        </tr>

        <tr>
          <td>Database Name:</td>

          <td><code><b>&nbsp;takeFocus</b></code></td>
        </tr>

        <tr>
          <td>Database Class:</td>

          <td><code><b>&nbsp;TakeFocus</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>This option determines whether the widget accepts the focus during
        keyboard traversal.&nbsp; It is almost identical to the standard option
................................................................................
      </blockquote>
    </dd>

    <dd id="textvariable">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>Command-Line Name:&nbsp;</td>

          <td><code><b>-textvariable</b></code></td>
        </tr>

        <tr>
          <td>Database Name:</td>

          <td><code><b>&nbsp;textvariable</b></code></td>
        </tr>

        <tr>
          <td>Database Class:</td>

          <td><code><b>&nbsp;Variable</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>If the value of this option is not an empty string then it must be
        an array.&nbsp; In this case, for each entry child of the given
................................................................................
        widget having two entry children is equivalent to specifying&nbsp;
        <code>-textvariable arr(0)</code>&nbsp; for the first and&nbsp;
        <code>-textvariable arr(1)</code>&nbsp; for the second entry child of
        that widget.</p>
      </blockquote>
    </dd>

    <dt id="description"><b>DESCRIPTION</b></dt>

    <dd>The <code><b>mentry::mentry</b></code> command creates a new window
    named <code><i>pathName</i></code> and of the class
    <code><b>Mentry</b></code>, and makes it into a <b>mentry</b> widget.&nbsp;
    Additional options, described above, may be specified on the command line
    or in the option database to configure aspects of the mentry such as its
    colors, font, and children.&nbsp; The <code><b>mentry::mentry</b></code>
    command returns its <code><i>pathName</i></code> argument.&nbsp; At the
    time this command is invoked, there must not exist a window named
    <code><i>pathName</i></code>, but <code><i>pathName</i></code>'s parent
    must exist.</dd>

    <dd class="tm">The word <i>mentry</i> is an abbreviation of
    <i>multi-entry</i>.&nbsp; A mentry is a mega-widget consisting of any
    number of entries separated by labels, all embedded in a frame.&nbsp; Due
    to appropriately chosen configuration options for the entries and labels, a
    mentry widget looks like one single entry containing preinserted text
    pieces that cannot be moved, changed, or deleted by the user.</dd>

    <dd class="tm">As described above, the initial width of each entry child
    (specified by the <code><b><a href="#body">-body</a></b></code>
    configuration option) also determines the maximal number of characters that
    can be inserted into it.&nbsp; This is achieved with the aid of the
    <code><b><a href="wcbRef.html#callback">wcb::callback</a></b></code>
    command, by registering the <code><b><a href=
    "wcbRef.html#entrycb">wcb::checkEntryLen</a></b></code>
    before-<code><b>insert</b></code> callback with the entry child.&nbsp; In
    order to keep this callback, additional before-<code><b>insert</b></code>
    callbacks (if needed) should only be registered with the <code><b><a href=
    "wcbRef.html#cbappend">wcb::cbappend</a></b></code> and <code><b><a href=
    "wcbRef.html#cbprepend">wcb::cbprepend</a></b></code> commands.&nbsp; When
    reaching this limit in an entry having the input focus, the latter is set
    automatically to the next enabled entry child, the contents of that widget
    is selected, and the insertion cursor is set to its end.&nbsp; This is made
    sure by defining an appropriate after-<code><b>insert</b></code> callback,
    which must be kept to be the last such callback for the entry.&nbsp; For
    this reason, additional after-<code><b>insert</b></code> callbacks (if
    needed) should only be registered with the
    <code><b>wcb::cbprepend</b></code> command.&nbsp; The same command should
    be used exclusively to define after-<code><b>motion</b></code> callbacks
    (if needed), because <code><b>mentry::mentry</b></code> registers one that
    must be the last after-<code><b>motion</b></code> callback for each entry
    child.</dd>

    <dd class="tm">Each mentry widget may have any number of <b>attributes</b>,
    which can be used in commands that create or manipulate mentry widgets for
    particular purposes.&nbsp; For example, each date mentry created by the
    <code><b><a href=
    "mentryDateTime.html#dateMentry">mentry::dateMentry</a></b></code> command
    has a <code><b>type</b></code> attribute having the value
    <code>"Date"</code> and a <code><b>format</b></code> attribute specifying
    the meanings of its components.&nbsp; The values of these attributes are
    queried and used in the bodies of the procedures <code><b><a href=
    "mentryDateTime.html#putClockVal">mentry::putClockVal</a></b></code> and
    <code><b><a href=
    "mentryDateTime.html#getClockVal">mentry::getClockVal</a></b></code>.</dd>

    <dt class="tm" id="indices"><b>INDICES</b></dt>

    <dd>Some of the widget commands for mentries take an index as
    argument.&nbsp; An index specifies a particular entry or label child of the
    mentry, in any of the following ways:</dd>

    <dd class="tm">
      <table border="0" cellpadding="6" cellspacing="0">
        <tr valign="top">
          <td><code><i>number&nbsp;&nbsp;</i></code></td>

          <td>Specifies the child as a numerical index, where <code>0</code>
          corresponds to the first entry or label child.</td>
        </tr>

        <tr valign="top">
          <td><code><b>end</b></code></td>

          <td>Indicates the last entry or label child of the mentry.</td>
        </tr>
      </table>
    </dd>

    <dd class="tm">The word <code><b>end</b></code> can be abbreviated as
    <code><b>en</b></code> or <code><b>e</b></code>.&nbsp; Out-of-range indices
>










|



|









>













>







 







>
>
|







 







<
<







 







>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







 







<





<





<







 







<





<





<







 







<





<





<







 







<





<





<







 







<





<





<







 







<





<





<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|









<






<







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
..
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
...
112
113
114
115
116
117
118


119
120
121
122
123
124
125
...
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
...
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
...
353
354
355
356
357
358
359

360
361
362
363
364

365
366
367
368
369

370
371
372
373
374
375
376
...
401
402
403
404
405
406
407

408
409
410
411
412

413
414
415
416
417

418
419
420
421
422
423
424
...
429
430
431
432
433
434
435

436
437
438
439
440

441
442
443
444
445

446
447
448
449
450
451
452
...
457
458
459
460
461
462
463

464
465
466
467
468

469
470
471
472
473

474
475
476
477
478
479
480
...
485
486
487
488
489
490
491

492
493
494
495
496

497
498
499
500
501

502
503
504
505
506
507
508
...
516
517
518
519
520
521
522

523
524
525
526
527

528
529
530
531
532

533
534
535
536
537
538
539
...
545
546
547
548
549
550
551


























































552
553
554
555
556
557
558
559
560
561

562
563
564
565
566
567

568
569
570
571
572
573
574
<!DOCTYPE html>
<html>
<head>
  <title>The mentry::mentry Command</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content="mentry, widget, entry, label">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>The <code><b>mentry::mentry</b></code> Command</h1>

    <h2>For Mentry Version 3.10</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <ul>
    <li><a href="#quick_ref">Quick Reference</a></li>

    <li><a href="#detailed_ref">Detailed Reference</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="quick_ref">Quick Reference</h2>

  <dl>
    <dt><a href="#name">NAME</a></dt>

................................................................................

    <dd>
      <pre>
<b>mentry::mentry</b> <i>pathName</i> ?<i>options</i>?
</pre>
    </dd>

    <dt><a href="#description">DESCRIPTION</a></dt>

    <dt class="tm"><a href="#std_options">STANDARD OPTIONS</a></dt>

    <dd>
      <pre>
<b>-borderwidth          -highlightcolor      -relief
-highlightbackground  -highlightthickness</b>
</pre>
    </dd>
................................................................................

    <dd>
      <pre>
<i>number</i>  <b>end</b>
</pre>
    </dd>



    <dt class="tm"><a href="#widget_command">WIDGET COMMAND</a></dt>

    <dd><code><i>pathName</i> <b><a href="#adjustentry">adjustentry</a></b>
    <i>index</i> <i>string</i></code></dd>

    <dd><code><i>pathName</i> <b><a href="#attrib">attrib</a></b> ?<i>name</i>?
    ?<i>value</i> <i>name</i> <i>value</i> ...?</code></dd>
................................................................................
    <dd>mentry, widget, entry, label</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="detailed_ref">Detailed Reference</h2>

  <dl>
    <dt id="name"><b>NAME</b></dt>

................................................................................

    <dd>
      <pre>
<b>mentry::mentry</b> <i>pathName</i> ?<i>options</i>?
</pre>
    </dd>

    <dt id="description"><b>DESCRIPTION</b></dt>

    <dd>The <code><b>mentry::mentry</b></code> command creates a new window
    named <code><i>pathName</i></code> and of the class
    <code><b>Mentry</b></code>, and makes it into a <b>mentry</b> widget.&nbsp;
    Additional options, described below, may be specified on the command line
    or in the option database to configure aspects of the mentry such as its
    colors, font, and children.&nbsp; The <code><b>mentry::mentry</b></code>
    command returns its <code><i>pathName</i></code> argument.&nbsp; At the
    time this command is invoked, there must not exist a window named
    <code><i>pathName</i></code>, but <code><i>pathName</i></code>'s parent
    must exist.</dd>

    <dd class="tm">The word <i>mentry</i> is an abbreviation of
    <i>multi-entry</i>.&nbsp; A mentry is a mega-widget consisting of any
    number of entries separated by labels, all embedded in a frame.&nbsp; Due
    to appropriately chosen configuration options for the entries and labels, a
    mentry widget looks like one single entry containing preinserted text
    pieces that cannot be moved, changed, or deleted by the user.</dd>

    <dd class="tm">The initial width of each entry child (specified by the
    <code><b><a href="#body">-body</a></b></code> configuration option) also
    determines the maximal number of characters that can be inserted into
    it.&nbsp; This is achieved with the aid of the <code><b><a href=
    "wcbRef.html#callback">wcb::callback</a></b></code> command, by registering
    the <code><b><a href=
    "wcbRef.html#entrycb">wcb::checkEntryLen</a></b></code>
    before-<code><b>insert</b></code> callback with the entry child.&nbsp; In
    order to keep this callback, additional before-<code><b>insert</b></code>
    callbacks (if needed) should only be registered with the <code><b><a href=
    "wcbRef.html#cbappend">wcb::cbappend</a></b></code> and <code><b><a href=
    "wcbRef.html#cbprepend">wcb::cbprepend</a></b></code> commands.&nbsp; When
    reaching this limit in an entry having the input focus, the latter is set
    automatically to the next enabled entry child, the contents of that widget
    is selected, and the insertion cursor is set to its end.&nbsp; This is made
    sure by defining an appropriate after-<code><b>insert</b></code> callback,
    which must be kept to be the last such callback for the entry.&nbsp; For
    this reason, additional after-<code><b>insert</b></code> callbacks (if
    needed) should only be registered with the
    <code><b>wcb::cbprepend</b></code> command.&nbsp; The same command should
    be used exclusively to define after-<code><b>motion</b></code> callbacks
    (if needed), because <code><b>mentry::mentry</b></code> registers one that
    must be the last after-<code><b>motion</b></code> callback for each entry
    child.</dd>

    <dd class="tm">Each mentry widget may have any number of <b>attributes</b>,
    which can be used in commands that create or manipulate mentry widgets for
    particular purposes.&nbsp; For example, each date mentry created by the
    <code><b><a href=
    "mentryDateTime.html#dateMentry">mentry::dateMentry</a></b></code> command
    has a <code><b>type</b></code> attribute having the value
    <code>"Date"</code> and a <code><b>format</b></code> attribute specifying
    the meanings of its components.&nbsp; The values of these attributes are
    queried and used in the bodies of the procedures <code><b><a href=
    "mentryDateTime.html#putClockVal">mentry::putClockVal</a></b></code> and
    <code><b><a href=
    "mentryDateTime.html#getClockVal">mentry::getClockVal</a></b></code>.</dd>

    <dt class="tm" id="std_options"><b>STANDARD OPTIONS</b></dt>

    <dd>
      <pre>
<b>-borderwidth          -highlightcolor      -relief
-highlightbackground  -highlightthickness</b>
</pre>
    </dd>
................................................................................

    <dt class="tm" id="widget_options"><b>WIDGET-SPECIFIC OPTIONS</b></dt>

    <dd class="tm" id="body">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>Command-Line Name:&nbsp;</td>

          <td><code><b>-body</b></code></td>
        </tr>

        <tr>
          <td>Database Name:</td>

          <td><code><b>&nbsp;body</b></code></td>
        </tr>

        <tr>
          <td>Database Class:</td>

          <td><code><b>&nbsp;Body</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>Specifies the initial widths of the entry children of the given
        multi-entry widget, as well as the texts to be displayed in the labels
................................................................................
      </blockquote>
    </dd>

    <dd id="disabledbackground">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>Command-Line Name:&nbsp;</td>

          <td><code><b>-disabledbackground</b></code></td>
        </tr>

        <tr>
          <td>Database Name:</td>

          <td><code><b>&nbsp;disabledBackground</b></code></td>
        </tr>

        <tr>
          <td>Database Class:</td>

          <td><code><b>&nbsp;DisabledBackground</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>This option, which is only supported for Tk versions 8.4 or higher,
        specifies the background color to use for all entry and label children
................................................................................
      </blockquote>
    </dd>

    <dd id="disabledforeground">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>Command-Line Name:&nbsp;</td>

          <td><code><b>-disabledforeground</b></code></td>
        </tr>

        <tr>
          <td>Database Name:</td>

          <td><code><b>&nbsp;disabledForeground</b></code></td>
        </tr>

        <tr>
          <td>Database Class:</td>

          <td><code><b>&nbsp;DisabledForeground</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>This option, which is only supported for Tk versions 8.4 or higher,
        specifies the foreground color to use for all entry and label children
................................................................................
      </blockquote>
    </dd>

    <dd id="readonlybackground">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>Command-Line Name:&nbsp;</td>

          <td><code><b>-readonlybackground</b></code></td>
        </tr>

        <tr>
          <td>Database Name:</td>

          <td><code><b>&nbsp;readonlyBackground</b></code></td>
        </tr>

        <tr>
          <td>Database Class:</td>

          <td><code><b>&nbsp;ReadonlyBackground</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>This option, which is only supported for Tk versions 8.4 or higher,
        specifies the background color to use for all entry and label children
................................................................................
      </blockquote>
    </dd>

    <dd id="takefocus">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>Command-Line Name:&nbsp;</td>

          <td><code><b>-takefocus</b></code></td>
        </tr>

        <tr>
          <td>Database Name:</td>

          <td><code><b>&nbsp;takeFocus</b></code></td>
        </tr>

        <tr>
          <td>Database Class:</td>

          <td><code><b>&nbsp;TakeFocus</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>This option determines whether the widget accepts the focus during
        keyboard traversal.&nbsp; It is almost identical to the standard option
................................................................................
      </blockquote>
    </dd>

    <dd id="textvariable">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>Command-Line Name:&nbsp;</td>

          <td><code><b>-textvariable</b></code></td>
        </tr>

        <tr>
          <td>Database Name:</td>

          <td><code><b>&nbsp;textvariable</b></code></td>
        </tr>

        <tr>
          <td>Database Class:</td>

          <td><code><b>&nbsp;Variable</b></code></td>
        </tr>
      </table>

      <blockquote>
        <p>If the value of this option is not an empty string then it must be
        an array.&nbsp; In this case, for each entry child of the given
................................................................................
        widget having two entry children is equivalent to specifying&nbsp;
        <code>-textvariable arr(0)</code>&nbsp; for the first and&nbsp;
        <code>-textvariable arr(1)</code>&nbsp; for the second entry child of
        that widget.</p>
      </blockquote>
    </dd>



























































    <dt id="indices"><b>INDICES</b></dt>

    <dd>Some of the widget commands for mentries take an index as
    argument.&nbsp; An index specifies a particular entry or label child of the
    mentry, in any of the following ways:</dd>

    <dd class="tm">
      <table border="0" cellpadding="6" cellspacing="0">
        <tr valign="top">
          <td><code><i>number&nbsp;&nbsp;</i></code></td>

          <td>Specifies the child as a numerical index, where <code>0</code>
          corresponds to the first entry or label child.</td>
        </tr>

        <tr valign="top">
          <td><code><b>end</b></code></td>

          <td>Indicates the last entry or label child of the mentry.</td>
        </tr>
      </table>
    </dd>

    <dd class="tm">The word <code><b>end</b></code> can be abbreviated as
    <code><b>en</b></code> or <code><b>e</b></code>.&nbsp; Out-of-range indices

Changes to modules/mentry/doc/wcbRef.html.


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
..
68
69
70
71
72
73
74

75
76
77
78
79
80
81
...
438
439
440
441
442
443
444

445
446
447
448
449
450
451
...
473
474
475
476
477
478
479

480
481
482
483
484
485
486
...
508
509
510
511
512
513
514

515
516
517
518
519
520
521
...
546
547
548
549
550
551
552

553
554
555
556
557
558
559
...
583
584
585
586
587
588
589

590
591
592
593
594
595
596
...
622
623
624
625
626
627
628

629
630
631
632
633
634
635
...
664
665
666
667
668
669
670

671
672
673
674
675
676
677
...
704
705
706
707
708
709
710

711
712
713
714
715
716
717
...
749
750
751
752
753
754
755

756
757
758
759
760
761
762
...
786
787
788
789
790
791
792

793
794
795
796
797
798
799
...
823
824
825
826
827
828
829

830
831
832
833
834
835
836
...
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
...
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
...
905
906
907
908
909
910
911

912
913
914
915
916
917
918
....
1006
1007
1008
1009
1010
1011
1012

1013
1014
1015
1016
1017
1018
1019
<html>
<head>
  <title>Wcb Command Reference</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content=
  "callback, widget, Tk entry, tile entry, BWidget Entry, Tk spinbox, tile spinbox, tile combobox, listbox, tablelist, tile treeview, text, ctext">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body bgcolor="#FFFFFF">
  <div align="center">
    <h1>Wcb Command Reference</h1>

    <h2>For Wcb Version 3.6</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <ul>
    <li><a href="#callback">The <code><b>wcb::callback</b></code>
    Command</a></li>
................................................................................
    <li><a href="#textcb">Before-<code><b>insert</b></code> Callbacks for text
    and ctext Widgets</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="callback">The <code><b>wcb::callback</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    spinbox, tile combobox, listbox, tablelist, tile treeview, text, ctext</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="cbappend">The <code><b>wcb::cbappend</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>callback, append, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="cbprepend">The <code><b>wcb::cbprepend</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>callback, prepend, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="cancel">The <code><b>wcb::cancel</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>cancel, command, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="canceled">The <code><b>wcb::canceled</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>cancel, command, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="extend">The <code><b>wcb::extend</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>extend, argument, command, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="replace">The <code><b>wcb::replace</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>replace, argument, command, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="pathname">The <code><b>wcb::pathname</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>path name, command, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="changeEntryText">The <code><b>wcb::changeEntryText</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    combobox, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="postInsertEntryLen">The <code><b>wcb::postInsertEntryLen</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    tile combobox, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="postInsertEntryText">The <code><b>wcb::postInsertEntryText</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    tile combobox, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="postDeleteEntryText">The <code><b>wcb::postDeleteEntryText</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    way to invoke this command from within a before-<code><b>delete</b></code>
    callback is as shown in the following example:</dd>

    <dd>
      <blockquote>
        <pre>
proc myBeforeDeleteCallback {w args} {
    #
    # Get the text that would be contained in the widget after
    # deleting the characters specified by $args, which stands
    # for the one or two arguments passed to delete; pass these
    # arguments to wcb::postDeleteEntryText by expanding $args
    #
    set newText [eval [list wcb::postDeleteEntryText $w] $args]
    if {!<i>some_condition_on_</i>$newText} {
        wcb::cancel
    }
}
</pre>
      </blockquote>
................................................................................
    <dd>The following alternative, more elegant solution requires Tcl/Tk 8.5 or
    later:</dd>

    <dd>
      <blockquote>
        <pre>
proc myBeforeDeleteCallback {w args} {
    # . . .
    set newText [wcb::postDeleteEntryText $w {*}$args]
    . . .
}
</pre>
      </blockquote>
    </dd>

................................................................................
    tile combobox, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="entrycb">Before-<code><b>insert</b></code> Callbacks for entry,
  spinbox, and combobox Widgets</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    spinbox, tile combobox, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="textcb">Before-<code><b>insert</b></code> Callbacks for text and
  ctext Widgets</h2>

  <dl>
    <dt><b>NAME</b></dt>
>











|













>







 







>







 







>







 







>







 







>







 







>







 







>







 







>







 







>







 







>







 







>







 







>







 







>







 







|




|







 







|







 







>







 







>







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
..
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
...
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
...
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
...
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
...
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
...
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
...
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
...
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
...
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
...
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
...
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
...
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
...
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
...
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
...
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
....
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
<!DOCTYPE html>
<html>
<head>
  <title>Wcb Command Reference</title>

  <meta name="Author" content="Csaba Nemethi">
  <meta name="Keywords" content=
  "callback, widget, Tk entry, tile entry, BWidget Entry, Tk spinbox, tile spinbox, tile combobox, listbox, tablelist, tile treeview, text, ctext">

  <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body>
  <div align="center">
    <h1>Wcb Command Reference</h1>

    <h2>For Wcb Version 3.6</h2>

    <h3>by</h3>

    <h2>Csaba Nemethi</h2>

    <address>
      <a href="mailto:[email protected]">[email protected]</a>
    </address>
  </div>

  <hr>

  <h2 id="contents">Contents</h2>

  <ul>
    <li><a href="#callback">The <code><b>wcb::callback</b></code>
    Command</a></li>
................................................................................
    <li><a href="#textcb">Before-<code><b>insert</b></code> Callbacks for text
    and ctext Widgets</a></li>
  </ul>

  <div align="center">
    <p><a href="index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="callback">The <code><b>wcb::callback</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    spinbox, tile combobox, listbox, tablelist, tile treeview, text, ctext</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="cbappend">The <code><b>wcb::cbappend</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>callback, append, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="cbprepend">The <code><b>wcb::cbprepend</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>callback, prepend, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="cancel">The <code><b>wcb::cancel</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>cancel, command, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="canceled">The <code><b>wcb::canceled</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>cancel, command, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="extend">The <code><b>wcb::extend</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>extend, argument, command, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="replace">The <code><b>wcb::replace</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>replace, argument, command, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="pathname">The <code><b>wcb::pathname</b></code> Command</h2>

  <dl>
    <dt><b>NAME</b></dt>

................................................................................
    <dd>path name, command, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="changeEntryText">The <code><b>wcb::changeEntryText</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    combobox, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="postInsertEntryLen">The <code><b>wcb::postInsertEntryLen</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    tile combobox, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="postInsertEntryText">The <code><b>wcb::postInsertEntryText</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    tile combobox, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="postDeleteEntryText">The <code><b>wcb::postDeleteEntryText</b></code>
  Command</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    way to invoke this command from within a before-<code><b>delete</b></code>
    callback is as shown in the following example:</dd>

    <dd>
      <blockquote>
        <pre>
proc myBeforeDeleteCallback {w args} {
    <span class="cmt">#
    # Get the text that would be contained in the widget after
    # deleting the characters specified by $args, which stands
    # for the one or two arguments passed to delete; pass these
    # arguments to wcb::postDeleteEntryText by expanding $args
    #</span>
    set newText [eval [list wcb::postDeleteEntryText $w] $args]
    if {!<i>some_condition_on_</i>$newText} {
        wcb::cancel
    }
}
</pre>
      </blockquote>
................................................................................
    <dd>The following alternative, more elegant solution requires Tcl/Tk 8.5 or
    later:</dd>

    <dd>
      <blockquote>
        <pre>
proc myBeforeDeleteCallback {w args} {
    <span class="cmt"># . . .</span>
    set newText [wcb::postDeleteEntryText $w {*}$args]
    . . .
}
</pre>
      </blockquote>
    </dd>

................................................................................
    tile combobox, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="entrycb">Before-<code><b>insert</b></code> Callbacks for entry,
  spinbox, and combobox Widgets</h2>

  <dl>
    <dt><b>NAME</b></dt>
................................................................................
    spinbox, tile combobox, widget</dd>
  </dl>

  <div align="center">
    <p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href=
    "index.html">Start page</a></p>
  </div>

  <hr>

  <h2 id="textcb">Before-<code><b>insert</b></code> Callbacks for text and
  ctext Widgets</h2>

  <dl>
    <dt><b>NAME</b></dt>