Tkinter:如何制作系统托盘应用程序? [英] Tkinter: How to make a system tray application?

查看:750
本文介绍了Tkinter:如何制作系统托盘应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个小应用程序.我希望我的目标用户(Windows,Linux)能够从系统托盘启动和退出应用程序.我打算使用Tkinter,因为它的占地面积小,但是我不知道如何实现它.

i have a small application. I want my target users(windows,linux) to be able to start and exit the application from the system tray. I intend to use Tkinter because of its low footprint but, i dont know how to implement it.

tkinter可以做到这一点还是有更好的选择.我需要一个不会将我的1MB程序更改为5MB程序的GUI库.

Can tkinter do this or are there better alternatives. I need a GUI library that won't change my 1MB program to a 5MB program.

请欣赏示例代码

谢谢

推荐答案

我不知道任何直接的示例,但是我找到了一个TCL/Tk扩展名,可以在

I don't know any direct examples but I found a TCL/Tk extension to use the systray over here http://wiki.tcl.tk/4090 and a page on the wiki giving information on how to use TCL/Tk extensions from Tkinter.

总的来说,您可能要考虑使用一个更高级"的工具箱(如wx),该工具箱本身提供诸如systray用法之类的功能.

On a more general note, you might want to consider using a more "advanced" toolkit (like wx) that provides things like systray usage etc. natively.

这篇关于Tkinter:如何制作系统托盘应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆