| Ticket UUID: | 1d926db5668056fef9bb2a77f081d5c57c88e3f5 | |||
| Title: | Can't toggle visibility of Tk app main menu with main window maximised | |||
| Type: | Bug | Version: | 8.6 | |
| Submitter: | anonymous | Created on: | 2024-01-03 11:39:19 | |
| Subsystem: | 12. Unix Menus | Assigned To: | nobody | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Open | Last Modified: | 2024-01-14 19:31:01 | |
| Resolution: | None | Closed By: | nobody | |
| Closed on: | ||||
| Description: |
I'm trying to toggle the visibility of the main menu in a Tk app. It works fine if the main window isn't maximised, but if the window is maximised, the menu stops toggling. I've tried it on an Ubuntu machine and also a Rocky Linux machine, and it fails on both. Also confirmed on #tcl chat. A code snippet is below.
package require Tk
wm title . menu
menu .menubar
.menubar add command -label hello -command "puts hi"
bind . <Alt-KeyPress-m> toggleMenu
proc toggleMenu {} {
if {[. cget -menu] eq ""} {
. configure -menu .menubar
} else {
. configure -menu ""
}
}
| |||
| User Comments: |
fvogel added on 2024-01-14 19:31:01:
Reproduced on Linux Debian 11. Note that :
fvogel added on 2024-01-03 20:33:56: For the records (since this is reported as a Linux issue), this works as expected on Win 11. | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki