3

I am developing an Eclipse RCP application (windows-only target platform) which uses both JFace TableViewers and NatTables.

When the user wants to resize a table column, they get two different mouse cursors for the two types of tables.

For NatTable this is SWT.CURSOR_SIZEWE. For SWT/JFace Tables this is like the "VSplit" cursor in the cursor list at http://www.java2s.com/Code/VB/GUI/ShowAllCursors.htm

Obviously, the reason is that SWT uses native table widgets and the "VSplit"-like cursor used by the OS (Windows) here is platform-dependent (it does not even seem to exist on other platforms). So, I guess this is the reason why there is no SWT.CURSOR_VSPLIT or similar constant.

Does anyone know of any other way to access the builtin windows VSplit cursor (or however it is actually called) so that I can (re)use that cursor for the NatTable resize handle? (My current workaround is to include my own custom "VSplit"-like cursor, but I'd like it better if I could reuse the system resource).

Stefan Winkler
  • 3,871
  • 1
  • 18
  • 35
  • That link just gives the .net names for cursors, on macOS SWT.CURSOR_SIZEWE looks like that "vsplit" cursor. On Windows the SWT code ends up calling the Windows [LoadCursor](https://learn.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-loadcursora) API - I don't see anything like "vsplit" in the supported cursor list. – greg-449 Apr 25 '19 at 10:29
  • That's what I wanted to say. On Windows, the SWT.CURSOT_SIZEWE which is used by NatTable and most of Eclipse is inconsistent to the one that is used in SWT Table Headers. The latter looks like the "vsplit" cursor in the link. But that seems not to be supported by the SWT cursor constants (most likely because it does not exist on platforms other than Windows). But to me it seems that it is a standard windows cursor which I want to access from Java/SWT. The question is how... – Stefan Winkler Apr 25 '19 at 15:25

0 Answers0