Community
Participate
Working Groups
When creating a SWT Combo and setting item list by setItems(), the Combo should have suitable width to show all the items. But in my following testcase, the created combo has a bit smaller width than expected. Combo combo = new Combo(root, SWT.READ_ONLY); String[] items = { "item 1", "item 2", "very long item" }; combo.setItems(items); If I select 3rd item ("very long item"), the last character "m" is shown partially. It causes a usability problem, especially in Double-byte (ex. Taiwan) locale. The half of the double-byte character is not shown. This problem is common in the Workbench. For example, in the JAVA Compiler preference in the 2.1.1 latest build (eclipse- SDK-RC2-win32.zip), there are Combos which have items, "Error", "Warning" and "Ignore", and the "Warning"s are truncated.
The SWT part seems to be working. Here is a snippet. Can you run this and confirm it fails on your machine? In the mean time, I'm going to move this PR to JFace. Thanks. Here is the code that WORKSFORME. import org.eclipse.swt.*; import org.eclipse.swt.widgets.*; public class PR_39463 { public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); Combo combo = new Combo(shell, SWT.READ_ONLY); String[] items = { "item 1", "item 2", "very long item" }; combo.setItems(items); combo.pack (); shell.open (); while (!shell.isDisposed ()) { if (!display.readAndDispatch ()) display.sleep (); } display.dispose (); } }
Steve, it doesn't seem that your sample works well. I got the 2.1.1 latest build (eclipse-SDK-2.1.1-win32.zip) and tested your sample with it... I still find a truncated string when the 3rd item is selected.
Back to SWT...
Not sure what to do. I will get FH to try this on Taiwan Windows. FH?
Works fine for me on (English) Windows XP. Eclipse 3.0 M2. Yoshio, does it only fails on double-byte platform ?
Felipe, the problem occurs in both Single-byte and Double-byte locale. The version of eclipse is 2.1.1.
Could you verify if the problem happens in HEAD stream, Eclipse 3.0 M2 for example ?
The problem still occurs in the latest Stable Build (eclipse-SDK-3.0M2- win32.zip).
We have also hit this testing our HATS plugin on WSSD V5.1: The jface wizard truncates based on screen size, also takes the space consumed by the windows task bar into account. The wizard should not truncate the content just because it wont fit on the screen without scrolling off. Any update?
Any new inforamtion of this problem? We are currently using WSSD V5.1 (with Eclipse 2.1.1) and need to understand if there is a fixpack level that we might be able to reference..
Which version of Windows are you running ? I can't reproduce the problem with the Combo widget. Regarding to your comments about jface wizard I can't help cause I really don't know JFace.
*** This bug has been marked as a duplicate of 89378 ***
Verified: Eclipse SDK 3.2.1 M20060921-0945