Hint text

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Hint text

Charles Hixson
Is there any way to show hints on mouseovers that doesn't require
writing a separate function for each, e.g., Radiobutton?

The only thing I've seen documentation say changes on mouseovers is the
state, and the documentation says it will call the command whenever the
state changes...but I don't see any way to tell what is having it's
state changed except by having different commands for each selection.

--
Charles Hixson

_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Hint text

Michael Lange
Hi Charles,

Thus spoketh Charles Hixson <[hidden email]>
unto us on Wed, 28 Dec 2011 21:11:20 -0800:

> Is there any way to show hints on mouseovers that doesn't require
> writing a separate function for each, e.g., Radiobutton?
>
> The only thing I've seen documentation say changes on mouseovers is the
> state, and the documentation says it will call the command whenever the
> state changes...but I don't see any way to tell what is having it's
> state changed except by having different commands for each selection.
>

unfortunately there is no such thing built into Tk by default, so you
will have to stick with some extra module. The good news is that there
are plenty of those available ready to use.
If installing the Pmw package is an option for you, you might want to
have a look at the Pmw.Ballon class:

http://pmw.sourceforge.net/doc/Balloon.html

I think Tix has a ballon widget either, but I haven't used Tix for a
couple of years, so I'm not exactly sure ;)

If you have IDLE already installed you can use its ToolTip class, like
this:

>>> from Tkinter import *
>>> from idlelib import ToolTip
>>> b=Button(text='foo')
>>> b.pack()
>>> ToolTip.ToolTip(b, 'bla')

In case you don't want to install IDLE, there is also a modified version
of IDLE's ToolTip available as a stand-alone module at:
http://tkinter.unpy.net/wiki/ToolTip

I hope this helps

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

We Klingons believe as you do -- the sick should die.  Only the strong
should live.
                -- Kras, "Friday's Child", stardate 3497.2
_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Hint text

python@bdurham.com
In reply to this post by Charles Hixson
Hi Charles,

There are many modules that add tooltip functionality to Tkinter; google
tooltip tkinter for a list.

One of my favorite tooltip modules is:
http://code.activestate.com/recipes/576688-tooltip-for-tkinter/

If you research this topic in more depth, let us know what module you
end up using.

Malcolm
_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Hint text

Cameron Laird-2
On Thu, Dec 29, 2011 at 06:40:34AM -0500, [hidden email] wrote:
                        .
                        .
                        .
> There are many modules that add tooltip functionality to Tkinter; google
> tooltip tkinter for a list.
>
> One of my favorite tooltip modules is:
> http://code.activestate.com/recipes/576688-tooltip-for-tkinter/
>
> If you research this topic in more depth, let us know what module you
> end up using.
                        .
                        .
                        .
More to read, on the same subject:  <URL: http://wiki.tcl.tk/10551 >.
_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss