Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333500 - SWT Text control with SWT.MULTI style appears incorrectly when disabled
Summary: SWT Text control with SWT.MULTI style appears incorrectly when disabled
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Scott Kovatch CLA
QA Contact: Silenio Quarti CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-04 13:13 EST by Sakis Kotisis CLA
Modified: 2011-01-25 16:37 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.