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.22.41;	author bparker;	state dead;
branches;
next	1.1;

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

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


desc
@@


1.2
log
@Upgrading to newer version
@
text
@#!/bin/sh
#\
exec itkwish $0
# ----------------------------------------------------------------------
#  EXAMPLE: show "TextInfo" and "MessageInfo" widgets in action
# ----------------------------------------------------------------------
#  COURSE:  Object-Oriented Programming with [incr Tcl]
#  AUTHOR:  Michael J. McLennan, Bell Labs Innovations
# ======================================================================
#               Copyright (c) 1996  Lucent Technologies
# ======================================================================
lappend auto_path .

if {[string match *color [winfo screenvisual .]]} {
    option add *textBackground ivory startupFile
    option add *MessageInfo.background DarkSeaGreen startupFile
    option add *TextInfo.background DarkSeaGreen startupFile
    option add *activeBackground ForestGreen startupFile
    option add *activeForeground white startupFile
    option add *selectForeground white startupFile
    option add *selectBackground ForestGreen startupFile
}

label .label -text "View File:"
pack .label -anchor w

entry .file
pack .file -fill x

bind .file <KeyPress-Return> {show_file [.file get]}

proc show_file {file} {
    set cmd {
        set fid [open $file r]
        set info [read $fid]
        close $fid
    }
    if {[catch $cmd] == 0} {
        set win [TextInfo .#auto -wrap none]
        $win display $info
    } else {
        MessageInfo .#auto -message "Cannot read file:\n$file"
    }
}
@


1.1
log
@Initial version of incrtcl
@
text
@@


1.1.2.1
log
@Upgrading to newer version
@
text
@@


