[Tutor] Tkinter: 'explanation text' when the mouse is over an image button ?

Kent Johnson kent37 at tds.net
Fri Sep 1 13:49:46 CEST 2006


learner404 wrote:
> Hello,
>
> With a Tkinter app I have buttons with an image filling each button like
> this,
>
> bu10=Button(frame2, image=picPlay, bg="white", command=play)
>
> I want to give a small explanation of each button when the user puts the
> mouse over the picture (something like the title tag in a hyperlink).
> I thougth I saw this in Tkinter but can't find it here:
> http://effbot.org/tkinterbook/button.htm

You want a tooltip for the button. There is nothing built-in to Tkinter 
to do this. Here are a couple of possibilities:
http://www.voidspace.org.uk/python/weblog/arch_d7_2006_07_01.shtml#e387
http://tkinter.unpythonic.net/wiki/ToolTip

Kent



More information about the Tutor mailing list