Community
Participate
Working Groups
I2003-02-27 Now that the background issue with labels seems to be solved, I found that checkboxes seem to have the same issue. The attached screenshot is taken from the Update Manage.
Created attachment 3770 [details] Screenshot taken from Update Manager
If the Upate manager sets the background color, then the bands won't show. Run the ControlExample to and set the background color to see this working. Alternately, the Update Manger should leave all the colors alone and then all the widgets should draw banded.
OK, but then it isn't a "won't fix" but more a PDE problem. Reopening and moving to PDE.
We DO set the background to match the background of the editor/view area. I don't think this is a PDE problem (although cannot claim 100%). All the widgets that appear in PDE forms have the background and foreground explicitly set using 'setBackground' and 'setForeground', otherwise they would have the default control colors (e.g. gray on default Windows).
It's quite possible this is an SWT problem although it doesn't show up in the ControlExample. Someone needs to construct a simple case ...
I would be happy to do it, but unfortunately I don't have a Mac here so cannot verify if it demonstrates the problem. Here is what we do to create the checkbox (this is a method from the class 'FormWidgetFactory' that is used to create all the widgets in PDE 'flat' style forms): public Button createButton(Composite parent, String text, int style) { int flatStyle = BORDER_STYLE == SWT.BORDER ? SWT.NULL :SWT.FLAT; Button button = new Button(parent, style | flatStyle); button.setBackground(backgroundColor); button.setForeground(foregroundColor); if (text != null) button.setText(text); button.addFocusListener(visibilityHandler); return button; }
Also note that by default colours are set to those obtained from SWT.COLOR_LIST_BACKGROUND and SWT.COLOR_LIST_FOREGROUND, respectively.
Problem no longer occurs in recent builds.