Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 267981

Summary: SWT.Border Checkbox not working in ControlExample for the DateTime Widget
Product: [Eclipse Project] Platform Reporter: Joshua Gosse <jlgosse>
Component: SWTAssignee: Xi Yan <xixiyan>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: cocoakevin, eclipse.felipe, ericwill, nikita, xixiyan
Version: 3.5Keywords: triaged
Target Milestone: 4.9 M2   
Hardware: PC   
OS: Linux-GTK   
See Also: https://git.eclipse.org/r/124203
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=236d0050ed609b91d5ef0affc37b63cb959a6208
https://git.eclipse.org/r/130802
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=e6549a8c732a29600409dd57282157bdf7a7fb5a
Whiteboard:
Attachments:
Description Flags
DateTime widget with SWT.DATE and SWT.DROP_DOWN none

Description Joshua Gosse CLA 2009-03-10 16:43:56 EDT
Loading ControlExample on Linux-GTK using the latest 3.5 M6 build and HEAD on CVS from SWT/GTK projects, open the DateTime tab, set the following style:

SWT.CALENDAR
SWT.MEDIUM
SWT.DROP_DOWN

Try checking SWT.BORDER

On my machine, the box does not check, the cursor disappears, and no border surrounds the Widget.
Comment 1 Eric Williams CLA 2017-03-14 11:18:35 EDT
Created attachment 267255 [details]
DateTime widget with SWT.DATE and SWT.DROP_DOWN

Not only is this still reproducible, but there are some other issues as well. SWT.BORDER does not "click" for any of DATE/TIME/CALENDAR styles. 

DROP_DOWN only works for the DATE style, but the actual drop down arrow button is not lined up well with the widget. See the attached screenshot for an example.
Comment 2 Eric Williams CLA 2017-03-14 11:33:33 EDT
Tossing this bug back into the pool in case anyone wants to work on it.
Comment 3 Eclipse Genie CLA 2018-06-07 10:40:06 EDT
New Gerrit change created: https://git.eclipse.org/r/124203
Comment 5 Eric Williams CLA 2018-06-11 10:50:54 EDT
(In reply to Eclipse Genie from comment #4)
> Gerrit change https://git.eclipse.org/r/124203 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=236d0050ed609b91d5ef0affc37b63cb959a6208

Patch is in master, thanks Xi.
Comment 6 Nikita Nemkin CLA 2018-10-10 03:14:26 EDT
This change incorrectly disables SWT.BORDER option on Windows.

SWT.BORDER is a valid style for almost all Windows controls. For some (like Spinner) it's essential.

I suggest reverting border-related changes to avoid complex platform-specific conditionals in ControlExample code. It's a given that not all platforms support all style combinations.
Comment 7 Eclipse Genie CLA 2018-10-11 09:52:35 EDT
New Gerrit change created: https://git.eclipse.org/r/130802
Comment 9 Xi Yan CLA 2018-10-18 09:56:14 EDT
(In reply to Eclipse Genie from comment #8)
> Gerrit change https://git.eclipse.org/r/130802 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=e6549a8c732a29600409dd57282157bdf7a7fb5a

Reverted border related change and closing this bug as per comment #6.