Artifact
09acd9b7e2d7fbc2b1fdb42b62537a9395d23ff1:
Attachment "menutest.tcl" to
ticket [870844ffff]
added by
vincentdarley
2004-01-05 18:22:43.
update
console show
update
proc mr {w count e} {
for {set i 0} {$i < 5} {incr i} {
if {$e} {
$w insert end command -label "entry$count$i" -command "foo $i"
}
if {$count > 0} {
set m $w.m$count$i
menu $m
$w insert end cascade -label "sub$count$i" -menu $m
mr $m [expr {$count -1}] 1
}
}
}
proc foo {args} {
puts stderr $args
}
menu .mb
update
. configure -menu .mb
mr .mb 5 0
update