aspose file tools*
The moose likes Java in General and the fly likes Newlines not shown when using trayicons on Ububtu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Newlines not shown when using trayicons on Ububtu" Watch "Newlines not shown when using trayicons on Ububtu" New topic
Author

Newlines not shown when using trayicons on Ububtu

Jonathan Culloty
Greenhorn

Joined: Apr 22, 2006
Posts: 16
A bit of an obscure problem here but someone might have an idea...

I've a multiplatform app that displays some info in the system tray...
When a user hovers the mouse over the tray icon a tooltip is displayed.
The info in my tooltip requires newlines to make it readable...
Windows and OSX have no problem with the newlines, but newlines are not shown in the tooltip when I'm running on ubuntu.
My code looks something like this...

Anyone have any suggestions, this is driving me mad :-)
Thanks,
Jonathan
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39834
    
  28
Don't know. You could try using the String.format method and %n, but I suspect that will simply convert to \n, in which case it will make no difference.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10523
    
    9

1) Try inserting a space between "\n" and Result
2) Consider using html for tool tips.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Jonathan Culloty
Greenhorn

Joined: Apr 22, 2006
Posts: 16
Thanks for the suggestions guys, I tried using HTML to format it but its not supported for trayicon tooltips.
Its only supported for normal graphics...
Space between \n and Result did help either..

I'll try String.format later but I suspect it'll be the same result.

Cheers,
Jon
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Newlines not shown when using trayicons on Ububtu