#!/usr/local/bin/wish

package require -exact BWidget 1.7.0


proc cbLdCancel {} {
  puts "Click"
}

set Progress 0
set Action "Loading files..."

ProgressDlg .loading -parent . -title "Loading" -type normal \
  -textvariable Action -variable Progress -maximum 20000 -stop "Cancel" \
  -command cbLdCancel

for {set x 0} {$x<20000} {incr x} {
  incr Progress
}

