Attachment "menubug2.tcl" to
ticket [680660ff]
added by
djarseneau
2005-05-28 11:48:39.
label .l -text \
{Position this window near the top or bottom of the screen
and click the menu button. Make a selection by clicking
again. Good. Now the menu tries to avoid overlapping
the menubutton.
Now move the window near the middle of the screen and click.
Oops! Unless your screen is very large, you select something
without seeing it.}
label .r -text {}
font create bigfont -family helvetica -size 16
menubutton .mb \
-highlightthickness 1 \
-menu ".mb.menu" \
-relief raised \
-takefocus 1 \
-font bigfont \
-text {Click Me}
menu .mb.menu -font bigfont
foreach item {Doc Happy Sleepy Bashful Grumpy Sneezy Dopey
Ori Nori Dori Oin Gloin Fili Kili Bifur Bofur Bombur Dwalin Balin Thorin
Dain Thrain
Gimli Groin Gror Dis Frerin Floi Loni Narvi } {
.mb.menu add command -label $item \
-command [list .r configure -text "You selected $item"]
}
pack .l .r .mb