View previous topic :: View next topic |
Author |
Message |
Kramer
Joined: 02 Sep 2004 Posts: 1
|
Posted: Wed Oct 26, 2005 7:21 pm Post subject: Garbage characters in tool tip for tray icon |
|
|
First off, let me say to all involved, thank you for this SWT port. I've been playing around with it and it is quite stable and functional.
In the process of playing around with the toolkit, when using the setToolTipText function for a TrayItem, there seems to be garbage characters that fill up the tool tip. Not sure what characters they are, but when displayed, they look like boxes.
Here's the code I used:
Code: |
TrayItem trayItem = new TrayItem(tray, SWT.NONE);
trayItem.setToolTipText(String.fromChar("SWT TrayItem"));
|
If you can't reproduce it from that, let me know and I'll see if I can scrounge up something more.
Thanks again,
Kramer |
|
Back to top |
|
|
Shawn Liu
Joined: 09 Mar 2005 Posts: 104 Location: Shanghai, China
|
Posted: Fri Oct 28, 2005 9:26 am Post subject: |
|
|
Hi, Kramer:
I added a system tray to the "hello world" example, using the same code codes as yours. I built it on WinXP and run it both in XP and Win2K, and it works OK. I have committed the example to svn. You can get it here :
http://svn.dsource.org/projects/dwt/downloads/win32/examples/traytest.rar
If you still have problem. Send your source code to me : shawn666.liu(a)gmail.com.
- Shawn |
|
Back to top |
|
|
Shawn Liu
Joined: 09 Mar 2005 Posts: 104 Location: Shanghai, China
|
Posted: Tue Nov 15, 2005 2:28 am Post subject: |
|
|
This phenomena is reproduced. And the problem may be very strange.
I built the program at home with both WindowXP and Windows2000 platform. It works perfect. No garbage characters appear. They are both Chinese version OS.
When I build the program at office (Win2000 English version), the garbage appears. When I run the program built with Chinese platform on English platform, the garbage still there.
There must be some thing wrong with the character processing. I will try to detect it later.
- Shawn |
|
Back to top |
|
|
Shawn Liu
Joined: 09 Mar 2005 Posts: 104 Location: Shanghai, China
|
Posted: Wed Nov 16, 2005 10:42 am Post subject: |
|
|
The bug fixed !
D spec says that the initial value of char is 0xFF, wchar is 0xFFF. I forgot to set the inital memory of TrayItem tooltip. The system showes all the 64 characters in the memory and causes the garbag.
I have made a new TrayIcon example which has the following features:
1) Right click context menu
2) Double click to show or hide main window
3) Minimize and Close to tray
4) Animated tray icon. (Enable/Disable)
I will submit the update soon.
Thanks for help to trace the bug.
- Shawn |
|
Back to top |
|
|
|