I am having a problem getting a tooltip to show up when I create it dynamically. If I set the text to some default string, it displays fine but when I set it to a variable, it doesn’t display. Any suggestions?
Here is the code I use to create the tool tip:
co_tt = s[23]
self.coVal.SetLabel (coStr[0:14])
self.coVal.SetToolTip (wx.ToolTip (co_tt))
if I were to make co_tt something like the follow:
Is there a fixed length on the tooltip size? I am trying to print a location of a file which could be several directories deep. My intent is to only show the file name and on mouse-over show the entire path.
I am having a problem getting a tooltip to show up when I create it dynamically. If I set the text to some default string, it displays fine but when I set it to a variable, it doesn’t display. Any suggestions?
Here is the code I use to create the tool tip:
co_tt = s[23]
self.coVal.SetLabel (coStr[0:14])
self.coVal.SetToolTip (wx.ToolTip (co_tt))
if I were to make co_tt something like the follow:
You may need to use TipWindow for that. I don't remember there being a
fixed length for tooltips, but I wouldn't be surprised either.
···
On Sep 3, 1:05 pm, Steve <ghostra...@gmail.com> wrote:
Is there a fixed length on the tooltip size? I am trying to print a location
of a file which could be several directories deep. My intent is to only show
the file name and on mouse-over show the entire path.
I am having a problem getting a tooltip to show up when I create it
dynamically. If I set the text to some default string, it displays fine
but when I set it to a variable, it doesn't display. Any suggestions?
if I were to make co_tt something like the follow:
co_tt = "Show tool tip"
It works.
Is s[23] a string? How big is it?
Is there a fixed length on the tooltip size? I am trying to print a location of a file which could be several directories deep. My intent is to only show the file name and on mouse-over show the entire path.
On Windows at least I think that there is a limit, but I don't remember the details. I would guess that it is something like 255 characters.
For me, there doesn't seem to be a reasonable size limit for tooltips
on win XP; even a string not fitting on the whole screen can be set
(e.g. str(range(2000)) which is 10890 chars).
for the original problem, I'd guess, something else than string or
unicode is being set; would it be possible to use
self.coVal.SetToolTip (wx.ToolTip (coStr)) instead of ... co_tt ? Is
it to create an abbreviated label with a complete string as tooltip?
vbr
···
2010/9/3 Robin Dunn <robin@alldunn.com>:
On 9/3/10 10:50 AM, Steve wrote:
Hello List,
I am having a problem getting a tooltip to show up when I create it
dynamically. If I set the text to some default string, it displays fine
but when I set it to a variable, it doesn't display. Any suggestions?
if I were to make co_tt something like the follow:
co_tt = "Show tool tip"
It works.
Is s[23] a string? How big is it?
Is there a fixed length on the tooltip size? I am trying to print a
location of a file which could be several directories deep. My intent is to
only show the file name and on mouse-over show the entire path.
On Windows at least I think that there is a limit, but I don't remember the
details. I would guess that it is something like 255 characters.
On Sep 3, 1:05 pm, Steve<ghostra...@gmail.com> wrote:
Is there a fixed length on the tooltip size? I am trying to print a location
of a file which could be several directories deep. My intent is to only show
the file name and on mouse-over show the entire path.
- Steve
You may need to use TipWindow for that. I don't remember there being a
fixed length for tooltips, but I wouldn't be surprised either.
You might also want to look at "agw.supertooltip" - check out the wxPython demo for it (btw you will have to enlarge the dialog a bit to make the two buttons show).
Yes, s[23] is a string of about 50 characters. There are ‘/’ in it but if I code those into a string statically they display just fine. It’s very odd that it won’t work and others just like it (same paths) work when hard coded.
I am having a problem getting a tooltip to show up when I create it
dynamically. If I set the text to some default string, it displays fine
but when I set it to a variable, it doesn’t display. Any suggestions?
Here is the code I use to create the tool tip:
co_tt = s[23]
self.coVal.SetLabel (coStr[0:14])
self.coVal.SetToolTip (wx.ToolTip (co_tt))
if I were to make co_tt something like the follow:
co_tt = “Show tool tip”
It works.
Is s[23] a string? How big is it?
Is there a fixed length on the tooltip size? I am trying to print a location of a file which could be several directories deep. My intent is to only show the file name and on mouse-over show the entire path.
On Windows at least I think that there is a limit, but I don’t remember the details. I would guess that it is something like 255 characters.
Hi,
what widget is coVal ?
I tested tooltips with wx.Button and didn't hit any limitation (string
size, slashes, backslashes ...) - on win XPp.
vbr
···
2010/9/5 Steve <ghostraker@gmail.com>:
On 9/3/10 10:50 AM, Steve wrote:
Hello List,
I am having a problem getting a tooltip to show up when I create it
dynamically. If I set the text to some default string, it displays fine
but when I set it to a variable, it doesn't display. Any suggestions?
Why don't you post a small runnable sample that allow others to run it
and also see the same error messages you are getting (if you're
getting any).
···
On Sun, Sep 5, 2010 at 4:18 AM, Steve <ghostraker@gmail.com> wrote:
On Fri, Sep 3, 2010 at 1:46 PM, Robin Dunn <robin@alldunn.com> wrote:
On 9/3/10 10:50 AM, Steve wrote:
Hello List,
I am having a problem getting a tooltip to show up when I create it
dynamically. If I set the text to some default string, it displays fine
but when I set it to a variable, it doesn't display. Any suggestions?
if I were to make co_tt something like the follow:
co_tt = "Show tool tip"
It works.
Is s[23] a string? How big is it?
Is there a fixed length on the tooltip size? I am trying to print a
location of a file which could be several directories deep. My intent is to
only show the file name and on mouse-over show the entire path.
On Windows at least I think that there is a limit, but I don't remember
the details. I would guess that it is something like 255 characters.
Yes, s[23] is a string of about 50 characters. There are '/' in it but if I
code those into a string statically they display just fine. It's very odd
that it won't work and others just like it (same paths) work when hard
coded.