1# ---------------------------------------------------------------------- 2# DEMO: new buttoncage 3# ---------------------------------------------------------------------- 4package require Iwidgets 4.0 5source ../src/buttoncage.itk 6 7puts "This demo creates a 5x2 grid of buttons..." 8 9. configure -relief ridge -bd 3 10iwidgets::buttoncage .bc -width 5 -height 2 11pack .bc 12 13for {set i 1} {$i <= 10} {incr i} { 14 .bc add $i -text "Button $i" \ 15 -command [eval {list puts "Congratulations. You just pressed button $i"}] 16} 17