Community
Participate
Working Groups
[Windows Vista] ProgressBar does not respect user-defined foreground colors. Using the enclosed sample on Microsoft Windows Vista (Beta), user-defined forground colors (e.g. org.eclipse.swt.widgets.ProgressBar#setForeground(org.eclipse.swt.graphics.Color)) are not updated in the progress bar. Instead, the progress bar remains the default system color (e.g. lime green).
Created attachment 55981 [details] ProgressBarColorTest.java
Is there any status on this defect? Increasing severity since this defect is the result of a broken API.
This defect was submitted to wrong component. Moving to SWT
Kevin, can you try this out? I believe that this is a Windows limitation. The progress bar does not respect colors on XP as well.
(In reply to comment #4) We see the same symptoms on Linux (x86) as well. For example, SLES and Fedora.
According to the win32 documentation the PBM_SETBARCOLOR Message is only supported in the Windows Classic Theme. Bogdan can you investigate gtk?
GTK uses the progress bar pic that is specified by the current theme. Setting the foreground color on the progress bar will not change the bar color. Switching themes will change the color.
Is there a way to programmatically achieve the same effect as XP (e.g. changing the color of the progress bar) on Vista and Linux?
There is no fix for this. The native widgets don't allow for their color to be changed. Note that XP doesn't allow you to change the color of a progress bar either (unless you are using the classic theme)
Thanks for the information. Moving forward, can this limitation be documented in the class header comment or on the FAQ?