head	1.2;
access;
symbols
	rel-5-2:1.1
	rel-5-1-patches:1.1.0.2
	rel-5-1:1.1;
locks; strict;
comment	@# @;


1.2
date	2000.12.06.21.23.27;	author bparker;	state dead;
branches;
next	1.1;

1.1
date	99.11.08.18.54.58;	author jra;	state Exp;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2000.12.06.21.28.11;	author bparker;	state dead;
branches;
next	;


desc
@@


1.2
log
@Upgrading to newer version
@
text
@#!/bin/sh
# ----------------------------------------------------------------------
#  DEMO: entryfield in [incr Widgets]
# ----------------------------------------------------------------------
#\
exec itkwish "$0" ${1+"$@@"}
package require Iwidgets 3.0

# itkwish interprets the rest...
# ----------------------------------------------------------------------
option add *textBackground seashell
. configure -background white

iwidgets::entryfield .login -labeltext "Login:" -labelpos nw \
    -command { focus [.passwd component entry] }
pack .login -padx 4 -pady 4

iwidgets::entryfield .passwd -labeltext "Password:" -labelpos nw -show "\267" \
    -command { focus [.phone component entry] }
pack .passwd -padx 4 -pady 4

iwidgets::entryfield .phone -labeltext "Phone:" -labelpos nw \
    -command { focus [.login component entry] } \
    -validate {check_phonenum %W "%c"}
pack .phone -padx 4 -pady 4

proc check_phonenum {entry char} {
    set current [$entry get]
    set len [string length $current]
    if {$len == 3 || $len == 7} {
        $entry delete 0 end
        $entry insert 0 "$current-"
    }
    if {$len < 12 && [string match {[0-9]} $char]} {
        return 1
    }
    return 0
}
@


1.1
log
@Stuff that got missed in the first pass
@
text
@@


1.1.2.1
log
@Upgrading to newer version
@
text
@@


