如何在 Tkinter 中显示工具提示? [英] How do I display tooltips in Tkinter?

查看:70
本文介绍了如何在 Tkinter 中显示工具提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

工具提示是当鼠标悬停在小部件上一段时间时弹出的那些小文本.

Tooltips are those little bits of text that popup when the mouse hovers over a widget for a certain duration of time.

如何向我的 tkinter Python 应用程序添加工具提示消息?

How can I add a tooltip message to my tkinter Python application?

推荐答案

Pmw.BalloonPmw 工具包 中的 a> 类将绘制工具提示.

The Pmw.Balloon class from the Pmw toolkit for Tkinter will draw tool tips.

另请看这篇博客文章,它改编了一些来自 IDLE 的代码,用于使用 Tkinter 显示工具提示.

Also take a look at this blog post, which adapts some code from IDLE used for displaying tool tips with Tkinter.

这篇关于如何在 Tkinter 中显示工具提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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