Bug 312314

Summary: Need to expose sash background and/or style in SashForm to be able to make it visible
Product: [Eclipse Project] Platform Reporter: Andriy Rysin <andriy.rysin>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Andriy Rysin CLA 2010-05-10 13:59:08 EDT
Build Identifier: M20080911-1700

Currently unless the components in the SashForm are using borders the sash positions between them is totally invisible so user has to guess by moving the mouse the looking for "arrows" cursor.
It's possible to control this with reflection but it would be nice if accessing sash background/style was a public API.

Snippet for changing sash background to make it visible:

public static void highlightSash(SashForm sash) {
  try {
    Field sashStyleField = sash.getClass().getDeclaredField("background"); //$NON-NLS-1$
    sashStyleField.setAccessible(true);
    sash.setSashWidth(2);
    sashStyleField.set(sash,      sash.getDisplay().getSystemColor(SWT.COLOR_GRAY));
    } catch (Exception e) {
      Logger.getLogger(MyClass.class).info("Sash highlighting failed: " + e.getMessage()); //$NON-NLS-1$
    }
}


Reproducible: Always

Steps to Reproduce:
1. Create SashForm with components without SWT.BORDER
2. Observe: it's hard to know if sash is there and if there where exactly
Comment 1 Eclipse Webmaster CLA 2019-09-06 15:38:26 EDT
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.