From: Aivar A. <aiv...@gm...> - 2021-06-08 18:01:08
|
Thanks a lot! I got it working with .wm_attributes("-titlepath", stringContainingTheAbsolutePathOfTheDocument) Passing empty string as the second argument turned the feature off. I had to do it after setting iconbitmap, otherwise the icon file became the titlepath. Best regards, Aivar Furthermore, I think there should be something more -- I need to somehow specify the path of the current document. I can't see how Tk could infer it. On Tue, Jun 8, 2021 at 3:26 PM Kevin Walzer <kw...@co...> wrote: > 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 > > > > _______________________________________________ > Tcl-mac mailing list > tc...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-mac > |