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

Bug 333500

Summary: SWT Text control with SWT.MULTI style appears incorrectly when disabled
Product: [Eclipse Project] Platform Reporter: Sakis Kotisis <kotisis>
Component: SWTAssignee: Scott Kovatch <skovatch>
Status: RESOLVED FIXED QA Contact: Silenio Quarti <Silenio_Quarti>
Severity: normal    
Priority: P3 CC: skovatch
Version: 3.6   
Target Milestone: 3.7 M5   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Sakis Kotisis CLA 2011-01-04 13:13:22 EST
Build Identifier: 3.6 Helios Release

Using Cocoa ws.
The multiline text control appears differently from the single line one, when setEnabled is set to false.
The cocoa multiline text control behaves exactly the same as the single line one, ideally so should the SWT control.

Reproducible: Always

Steps to Reproduce:
1. Run the SWT controls examples
2. On the SWT Text example tab select SWT.SINGLE and toggle enablement
3. Select SWT.MULTI and toggle enablement
Comment 1 Scott Kovatch CLA 2011-01-05 14:06:33 EST
This is platform behavior, unfortunately. Single-line Text objects use NSTextField, which draws its contents with the disabled text color if the control is disabled. Multiline Text objects use NSTextView, which doesn't really support the notion of a 'disabled' appearance.

Having said that, I do think we should try to do something here. Right now a multiline Text has no visual indication that it's disabled. We can set the text color to NSColor.disabledControlTextColor, but I'd like to find someplace in the Mac UI that disables an NSTextView.
Comment 2 Scott Kovatch CLA 2011-01-05 17:20:21 EST
This isn't that bad, actually. For the MULTI case we can just add an alpha to the foreground color if one has been set, and use disabledControlTextColor otherwise. It looks like that's what NSTextField is doing anyway.
Comment 3 Scott Kovatch CLA 2011-01-05 17:22:24 EST
Fixed > 20110105.