package require Tk
text .t -yscrollcommand {.s set}
scrollbar .s -command {.t yview}
pack .s -side right -fill y
pack .t -side left -fill both -expand 1
set f [open $filename r]
set data [read $f]
close $f
.t delete 0.0 end
.t insert 0.0 $dataAnd Marty Backe posted this as a follow-up:
package require Iwidgets iwidgets::scrolledtext .t pack .t -fill both -expand true .t insert $filename end # To clear the widget between file reads: .t clear
Category GUI - Category File
