简体   繁体   English

Tkinter托盘图标(winico,twapi,pywin32)

[英]Tkinter tray icon (winico, twapi, pywin32)

I am learning tkinter but get disappointed about the lack of a tray handling feature. 我正在学习tkinter,但对缺少托盘处理功能感到失望。 So far, I found some tcl extensions: winico http://wiki.tcl.tk/4089 and twapi http://wiki.tcl.tk/9886 Unfortunately, I lack the ability to make python/c/tcl wrappers (if anyone know that can help ñ_ñ) Also I found pywin32 and write a little tray/console app, but I don't know how to use it with tkinter (it freezes the tk() window). 到目前为止,我发现了一些tcl扩展名: winico http://wiki.tcl.tk/4089twapi http://wiki.tcl.tk/9886不幸的是,我缺乏制作python / c / tcl包装器的能力(如果任何人都知道这可以帮助ñ_ñ)另外,我找到了pywin32并编写了一个小托盘/控制台应用程序,但是我不知道如何在tkinter中使用它(它冻结了tk()窗口)。 However, I prefer to use extension instead of the windows api. 但是,我更喜欢使用扩展名而不是Windows API。

Is this mailing list message any help? 邮件列表消息有帮助吗?

Edit with comment from @FelipeJavierV.H.: 使用@ FelipeJavierV.H。的评论进行编辑:

So I contacted Michael Lange and he shared with me a wrapper he wrote for winico / tktray : 因此,我联系了迈克尔·兰格Michael Lange) ,他与我分享了他为winico / tktray写的tktray

  1. Download winico . 下载winico
  2. Unzip the winico folder in the tcl folder of your Python installation (eg C:\\Programas\\Python25\\tcl\\winico0.6\\ . Note: a lot of files inside, demo.tcl , pkgIndex.tcl , Winico06.dll ). winico文件夹解压缩到Python安装的tcl文件夹中(例如C:\\Programas\\Python25\\tcl\\winico0.6\\ 。注意:里面有很多文件demo.tclpkgIndex.tclWinico06.dll )。
  3. Download this program , extract it and execute TrayIcon.py (maybe with a smiley.ico in the same folder). 下载此程序 ,解压缩并执行TrayIcon.py (也许在同一文件夹中带有smiley.ico )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM