Community
Participate
Working Groups
Created attachment 82327 [details] Snippet demonstrating the use of a DateTime widget as CellEditor in a Table within a TableViewer While using the DateTime widget as CellEditor Control of a cell in a TableViewer I have noticed the following: 1) Cannot show the DateTime without border. Other CellEditors show in a "flat" way, the DateTime not. I haven't found any way of influencing the STW style in order to remove the border. 2) The lower part of the DateTime text is below the cell and thus partly not visible (this would probably be handled if the border wasn't there or if one could set the vertical text alignment to top) Also see attached snipped to reproduce Version: 3.3.0 Build id: I20070621-1340
Car to see if this is natively supported or not.
I can do this natively on WIndws by adding the following code to createHandle() after the handle is created: if ((style & SWT.BORDER) == 0) { int bits = OS.GetWindowLong (handle, OS.GWL_EXSTYLE); bits &= ~(OS.WS_EX_CLIENTEDGE | OS.WS_EX_STATICEDGE); OS.SetWindowLong (handle, OS.GWL_EXSTYLE, bits); } I am not sure if the check should be: if ((style & SWT.BORDER) == 0) { or: if ((style & SWT.FLAT) != 0) { Grant, do you know which it should be?
I think it should be "if ((style & SWT.BORDER) == 0)". This would make it match the DateTime on gtk (no border unless style SWT.BORDER specified) and would also match Spinner on win32 (which is of a very similar nature).
Thanks, Grant - I think that's the correct way. Also, I've just noticed that the javadoc for SWT.FLAT says it's only used for buttons and toolbars. Fixed > 20071107.
This still seems to be a problem on Vista with 3.4 M5.
*** Bug 223426 has been marked as a duplicate of this bug. ***
Reopening so that the Vista bug does not get lost.
Please adjust the target milestone, so it does not point at a closed milestone in the past.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.