From: Kevin W. <kw...@co...> - 2021-06-08 12:25:32
|
On 6/8/21 2:33 AM, Aivar Annamaa wrote: > Hi! > > In many macOS apps, when you Command-click on window's title, macOS > will show a menu describing the location of the currently open > document (see > https://oneminutemacman.com/command-click-a-windows-title-to-show-the-documents-location/ > <https://oneminutemacman.com/command-click-a-windows-title-to-show-the-documents-location/>). > > Is it possible to control this in a Tk app? My Tkinter app currently > does show this menu, but it is always describing the location of the > application's icon file (set with root window's iconbitmap method). > > If there are no direct means for this in Tk, perhaps you know the name > of the corresponding method in Cocoa? Maybe it's possible to call it > via Python's ctypes. > > Best regards, > Aivar In Tcl, the command is [wm attributes $w -titlepath true]. In Python/Tkinter, it's something like w.wm_attributes("titlepath", "true"), where $w or w is the window name/object. (My Python is a bit rusty, but give this a try.) --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com |