Tk Source Code

Artifact [5942909b]
Login

Artifact 5942909bad218b982693aa0ed68bf5737d733dfb:

Attachment "err.tcl" to ticket [2128087f] added by [email protected] 2008-09-25 17:22:42.
Please run by wish the following script under win32. The menu-traversal shortkey
doesn't work.

Thank you all.

[email protected]


#################################################################################
#!/usr/bin/wish

frame .f
pack .f -fill x

frame .f2
pack .f2


# the "-underline 0" switch should create a menu-traversal shortkey.
# Then using alt-f we aspect to open the menu.
# It works in linux, but not in win32 :(
#
menubutton .f.mb -text "File" -underline 0 -menu .f.mb.m

menu .f.mb.m -tearoff 0


.f.mb.m add command -label "dummy" -underline 0 -command {
}

.f.mb.m add command -label "exit" -underline 0 -command {
        exit
}

 
pack .f.mb -side left

label .f2.l -text "sample"
pack .f2.l -side bottom


focus -force .f
update
##########################################################