Combo look-and-feel on Windows 7 [message #653610] |
Thu, 10 February 2011 07:02  |
Eclipse User |
|
|
|
Hi all,
In our RCP application we set the background of a combo to let the user know it is a required field. When running this application on Windows XP the background of the text-area of the combo is rendered in blue.
When we run this application on a Windows 7 the background of this text-area is rendered in some grey color. When the combo list is shown the background of the list is still in blue. But because of this grey color the user can't see anymore if this field is required or not.
I tried running our application with both Eclipse 3.5 and Eclipse 3.6 SR1, but the look-and-feel of the combo is the same. So I guess (and fear) this new look is the new style of a combo in Windows 7. It's quiet an important part of the user experience of our application, so it would be great if this grey color can be changed back to blue on Windows 7.
Any suggestions / ideas are highly appreciated.
Thanks!
Kind regards,
Roel
|
|
|
|
Re: Combo look-and-feel on Windows 7 [message #654793 is a reply to message #653610] |
Thu, 17 February 2011 02:59   |
Eclipse User |
|
|
|
Hi Grant,
I used following small code snippet to test the combo's behavior:
public class ComboTest {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setText("ComboTest");
shell.setLayout(new FillLayout(SWT.VERTICAL));
new Text(shell, SWT.SINGLE);
Combo combo = new Combo(shell, SWT.READ_ONLY);
combo.setItems(new String[] { "A", "B", "C" });
combo.setBackground(new Color(display, 153, 186, 243));
shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
}
I don't see any possibility to attach some files to this topic, so I guess it's not allowed to add files to this forum (according to the help pages).
I executed this program on a Windows XP and a Windows 7 machine and took some screenshots to show the difference.
1. WinXP with XP Theme

2. WinXP with Classic Theme

3. Win7 with Win7 Basic Theme

4. Win7 with Windows Classic Theme

As you can see the combo looks different on a Win7 with Win7 basic theme (see 3rd screenshot) and the user can't see the blue-ish color (which in our application is the color to indicate a mandatory field).
I ran the code snippet with both Eclipse 3.5 (sr2) and 3.6 (sr1) and the results are the same. I also tried with a different color, but again similar results.
Kind regards,
Roel
|
|
|
Re: Combo look-and-feel on Windows 7 [message #654904 is a reply to message #654793] |
Thu, 17 February 2011 09:56   |
Eclipse User |
|
|
|
I see, this is for read-only Combos. This is a behaviour that comes from
the theme, so it's "correct" (see "hint" in the javadoc for
Control.setBackground()). It's not something that swt would change, and
quite possibly could not override anyways. I don't know of a workaround to
suggest to make this work, other than to change your visual cue for marking
a control as being "required".
Grant
"Roel De Nijs" <roel@javaroe.be> wrote in message
news:ijik5k$jq9$1@news.eclipse.org...
> Hi Grant,
>
> I used following small code snippet to test the combo's behavior:
> public class ComboTest {
> public static void main(String[] args) {
> Display display = new Display();
> Shell shell = new Shell(display);
> shell.setText("ComboTest");
> shell.setLayout(new FillLayout(SWT.VERTICAL));
>
> new Text(shell, SWT.SINGLE);
>
> Combo combo = new Combo(shell, SWT.READ_ONLY);
> combo.setItems(new String[] { "A", "B", "C" });
> combo.setBackground(new Color(display, 153, 186, 243));
>
> shell.pack();
> shell.open();
> while (!shell.isDisposed()) {
> if (!display.readAndDispatch())
> display.sleep();
> }
> display.dispose();
> }
> }
>
>
> I don't see any possibility to attach some files to this topic, so I guess
> it's not allowed to add files to this forum (according to the help pages).
>
> I executed this program on a Windows XP and a Windows 7 machine and took
> some screenshots to show the difference.
>
> 1. WinXP with XP Theme
>
>
> 2. WinXP with Classic Theme
>
>
> 3. Win7 with Win7 Basic Theme
>
>
> 4. Win7 with Windows Classic Theme
>
>
> As you can see the combo looks different on a Win7 with Win7 basic theme
> (see 3rd screenshot) and the user can't see the blue-ish color (which in
> our application is the color to indicate a mandatory field).
>
> I ran the code snippet with both Eclipse 3.5 (sr2) and 3.6 (sr1) and the
> results are the same. I also tried with a different color, but again
> similar results.
>
> Kind regards,
> Roel
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.52759 seconds