• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Newlines not shown when using trayicons on Ububtu

 
Jonathan Culloty
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 49364
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11061
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Try inserting a space between "\n" and Result
2) Consider using html for tool tips.
 
Jonathan Culloty
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic