SetToolTipString weirdness Topic is solved

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
ianar
Experienced Solver
Experienced Solver
Posts: 51
Joined: Tue Feb 07, 2006 5:50 pm
Location: Florida
Contact:

SetToolTipString weirdness

Post by ianar »

when i use '\n' in my tool tip, it drops down a line as expected, but then every other tooltip in the app is only allowed to be that long. Any ideas as to why?
.
o--|==ianar
leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Post by leio »

This is wxMSW specific, btw
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/
ianar
Experienced Solver
Experienced Solver
Posts: 51
Joined: Tue Feb 07, 2006 5:50 pm
Location: Florida
Contact:

Post by ianar »

OK, but why? ... and is there a fix?

thanks
.
o--|==ianar
leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Post by leio »

Not that I know of.

This is bug #1298359
http://sourceforge.net/tracker/index.ph ... tid=109863
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/
ianar
Experienced Solver
Experienced Solver
Posts: 51
Joined: Tue Feb 07, 2006 5:50 pm
Location: Florida
Contact:

Post by ianar »

thanks for clearing that up.
.
o--|==ianar
Ksmith22
I live to help wx-kind
I live to help wx-kind
Posts: 199
Joined: Mon Nov 21, 2005 4:34 pm

Post by Ksmith22 »

Yeah I've had this problem too. Very annoying.

What I ended up doing was making sure my tooltips that used a \n had at least one non-spaced line that was as long as my longest tooltip. In my particular case it worked based on what I was using the tooltips for (the ones that used \n) but it was a very *very* cheesy solution.

There really needs to be a wxWindow::SetToolTipWidth(int) type function, or even a wxWindow::GetTooltip() type function that would return a wxToolTip object that could be modified and passed back (though wxToolTip is pretty sparce in its functionality, not even having the max width function).
leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Post by leio »

I don't see why this shouldn't be transparent to the user by default. As it is in wxGTK right now
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/
Ksmith22
I live to help wx-kind
I live to help wx-kind
Posts: 199
Joined: Mon Nov 21, 2005 4:34 pm

Post by Ksmith22 »

leio wrote:I don't see why this shouldn't be transparent to the user by default. As it is in wxGTK right now
I could understand the developer wanting to set a max width or something, but otherwise yes, by default it should be wrapped. No one wants to look at a potentially screen-resolution-long (i.e. 1024) one-line text string. And if they do I could see something like a bool with a default value (of wrapping = true, or nowrap = false) as a second arguement in SetToolTip() being an easy solution.
Post Reply