Re: trouble creating tooltips using Wx in Tk canvas
- From: Ravikanth <vvnrk.vanapalli@xxxxxxxxx>
- Date: Wed, 6 Jul 2011 12:35:59 -0700 (PDT)
On Jul 6, 1:32 pm, Ian Kelly <ian.g.ke...@xxxxxxxxx> wrote:
On Wed, Jul 6, 2011 at 9:12 AM, Ravikanth <vvnrk.vanapa...@xxxxxxxxx> wrote:
Hi all,
Hi all,
I am having a trouble creating tooltips. I am trying to embed a
matplotlib graph inside a TkInter canvas. After some search over the
net, I found out a way to create tooltips using the WXbackend.
But when I embed my matplotlib figure inside a Tk and the tooltips
are not getting displayed.
That's pretty much what I would expect, since wxPython and Tkinter are
completely different GUI libraries. Trying to use them together is a
bit like trying to call a .NET function from Java -- maybe possible,
but it's going to take a lot of work.
The error I am getting is below.
Traceback (most recent call last):
File "U:\graphing_tool\plotinsideTkInter\plotInTk.py", line 12, in
<module>
tooltip = wx.ToolTip(tip='tip with a long %s line and a newline\n'
% (' '*100)) # needs to be added to getover the bug with tooltip.
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_misc.py",
line 771, in __init__
_misc_.ToolTip_swiginit(self,_misc_.new_ToolTip(*args, **kwargs))
PyNoAppError: The wx.App object must be created first!
I am not able to figure out the reason.
As it says, you haven't created the wx.App object necessary for pretty
much all wxPython code. You could create one, but your tooltip still
would not work correctly because you would be running the Tkinter
event loop rather than the wxPython event loop. If you want to use
the wxToolTip widget, then you should write your program to use
wxPython only. Alternatively, googling for "tkinter tooltip" turns up
a couple of recipes; you could try one of those.
Cheers,
Ian
Thank you Ian for your insights to me on this.
I will migrate to wxPython to achieve the functionality.
.
- Follow-Ups:
- Re: trouble creating tooltips using Wx in Tk canvas
- From: Kevin Walzer
- Re: trouble creating tooltips using Wx in Tk canvas
- References:
- trouble creating tooltips using Wx in Tk canvas
- From: Ravikanth
- Re: trouble creating tooltips using Wx in Tk canvas
- From: Ian Kelly
- trouble creating tooltips using Wx in Tk canvas
- Prev by Date: Re: Implicit initialization is EVIL!
- Next by Date: Re: Does hashlib support a file mode?
- Previous by thread: Re: trouble creating tooltips using Wx in Tk canvas
- Next by thread: Re: trouble creating tooltips using Wx in Tk canvas
- Index(es):
Relevant Pages
|