Project: SWT
Bug 34835 Widget "default" styles should be reflected in style bits
Reported: 2003-03-12 12:19:47 | Status: verified fixed

RC2 There are various cases, easily shown in the ControlExample, of widgets taking on a "default" style even though an explicit style bit is not provided. For example, a Label of type SWT.SEPARATOR defaults to be vertical unless SWT.HORIZONTAL is explicitly specified. This is fine, but consequently invoking Label.getStyle() answers a style that does not contain the SWT.VERTICAL bit since it was not explicitly specified at creation time. The checkStyle() methods on a few widgets need to be extended to ensure that "default" styles get added in to specified styles whenever "default" styles are to be used.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Label.java bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Label.java bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Label.java bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java